Hi,
I have created checkbox using toolset fields and used them on custom post form. When I am trying to get the checkbox value on the frontend using PHP its not showing. I have used these functions to get the value :
$carrieroperation = get_post_meta( $carrier_id, 'wpcf-carrieroperation', true );
$carrieroperation = types_render_field( "carrieroperation", array( "separator" => ", " ) );
please check attached screenshot as well for field name.
Hello,
In you case, I suggest you try to specific the post ID parameter in types_render_field function, for example:
$carrieroperation = types_render_field( "carrieroperation", array( "separator" => ", ", "post_id"=>$carrier_id) );
And test again
I have tried with ID as well but no luck, nothing showing.
Since it is a custom PHP codes problem, please provide a test site with the same problem, also point out the problem page URL and where I can edit your PHP codes, I need to test it in a live website, thanks
Can we do a screen share, please let me know your best time for the meeting so we can check the issue.
I have tried the PHP codes in my localhost with a fresh wordpress installation + the latest version of Toolset plugins, it works fine.
So I don't think screenshots will help.
Please check these in your website:
1) In case it is a compatibility problem, please deactivate all other plugins, and switch to wordpress default theme 2020, deactivate all custom PHP/JS code snippets, and test again
3) Also check if there is any PHP/JS error in your website:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/
4) If the problem still persists, please provide database dump file(ZIP file) of your website, also point out the problem page URL and where I can edit your PHP codes, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/
My issue is resolved now. Thank you!