Hi. I need to add ACF fields to a form on the front-end.
I tried using <?php the_field(‘my_custom_field’); ?> but the field does not show up.
Any help is greatly appreciated.
Hi John, I forgot that i already posted here.
I created a new thread explaining that i already tried the acf_form, but it only shows fields related to pages not to products.
https://support.advancedcustomfields.com/forums/topic/form-fields-in-wcmp-vendor-dashboard/
Thank you for your help.
Supply more information. Where are you adding code? What code are you adding?
I added <?php acf_form_head(); ?> to the very top of the document
Inside the original form i added:
<p>Condition Label<?php the_field('condition'); ?></p>
<?php acf_form(array(
'form' => false
)); ?>
If i set the_field to target one of the fields related to pages, it shows up working. When i target it to fields related to products nothing shows up.
Actually the page field shows up no matter what.
You have to supply the post ID of the product that is being edited. https://www.advancedcustomfields.com/resources/acf_form/