Hi @hiteshkumarwt
Would you please describe the requirements you have regarding this in detail? We will then get back to you accordingly.
Regards!
I have created registration form using the plugin
i want o add one select box name Stakeholder type that option should fetch from CPT taxonomy so that i am not able to do that there any hook or another way to perfrom that task
Hi @hiteshkumarwt
We have forwarded this to our developers. They will look into this and get back to you soon.
Regards!
Hi @hiteshkumarwt
Thanks for writing back,
This can be done with the help of a custom code. You have a sample code below. Please use this code and try changing required details.
add_filter('user_registration_form_field_args', 'dropdown_field_options', 10, 3);
function dropdown_field_options($args, $key, $value)
{
$field_name = 'select_12345'; // This should be the field_name of your select field
if ( $key !== $field_name ) {
return $args;
}
$options = array();
// Your logic to extract the taxonomies from post types according to the plugin you use
if($field_name === $key || 'user_registration_'.$field_name === $key ) {
$args['options'] = $options;
}
return $args;
}
I hope this helps.
Regards!
Hi @hiteshkumarwt
Since we haven’t heard from you in a while, I’m going to go ahead and conclude this thread for now. However, if you have any further questions or if there’s anything else we can assist you with, please feel free to continue the conversation.
Regards!