I added a second post form and attempted to add an additional function:
break;
}
return $options;
}
// Dynamic title for cameras
add_filter( 'wpt_field_options2', 'func_to_dynamically_populate_camera_locations', 10, 3);
function func_to_dynamically_populate_camera_locations( $options, $title, $type ){
switch( $title ){
case 'Camera Title':
$options = array();
to provide a select field to pull the titles from the 'cameras' CPT into the CRED form. But it's not working. I added a 'camera title' select field to the form and added
Hello. Thank you for contacting the Toolset support.
The hook name to fill the dynamic option to the Types select field is wpt_field_options and you are using the hook wpt_field_options2 which is not correct.
you will require to use the hook wpt_field_options and change the function name to something else but I hope and consider here that you already created select field using Types.
Can you please share problem URL and access details and share what form you are using and what content you want to display with your location field.
Also, please share what thing is broken and not working. Once I get the information and review the things I will be able to guide you in the right direction.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
When I loggedin to your site and checked the view - I see that your view is set to display the CPT " vehicles".
Now, When I edit any single "vehicles" post - I see there is a field available "TMNA Location" and that field is a textbox and not having any content.
=> versteckter Link
Also, I see that the same field "TMNA Location" is also available with CPT 'TMNA Location' and again it's a text field instead of the select field.
Have you made any changes to your site as well as I would like to know - did you created select field or text field? From what post type (vehicles OR TMNA Locatio) you want to display the field value. As for now, I do not see any select box for TMNA Location field.
In addition to that, where you added the custom code with the filter "wpt_field_options2"?
The only changes I've made since we talked in the previous ticket were on other CPTs. But for the sake of this issue I'll re-iterate what I'm trying to do from the beginning:
From within the 'vehicles' CPT I need to beable to select post-titles from TMNA-locations and save them to vehicle-locations custom field. I also need to do this same thing from other CPTs For example, from the 'kanbans' CPT, I also need to be able to select post-titles from the TMNA-locations and save them to the vehicle-locations custom field (and so on). This was working before. The data was there, and the views was also working.
That isn't the whole problem tho. The first issue is that the data that was written to the vehicle-location field is missing. So there has to be something wrong with the function? The view component of this is secondary.
The first issue is that the data that was written to the vehicle-location field is missing.
==>
That is what I'm saying that why the data is missing. What changes you made to the side so that those field values are missing even you say you have a dropdown and I do not see any dropdown while I edit your post.
So there has to be something wrong with the function? The view component of this is secondary.
==>
Where you added the function? where I can find the function and to what field that function you have applied?
Where you added the code that you shared with your initial post?