My php skills are basic and I will be glad to get some help with one custom form. I have acf field in the backend and it’s working great. I want to implement the same field in front end form. I created the html field and set the variables. Can you give me directions what I should put in my form processing script? I tried with update_post_meta($post_id,’date’, $date); but without luck. My ACF field name is date.
$date is holding the selected date.
Sorry for the unclear description. So I have installed AFC plugin and created a custom field from type datepicker. I assigned this field to posts. I have custom new post form which users with specific permissions can submit when they login. The custom field currently is available only for the admins who create new post from the WP admin panel. I want to make the custom field available in my front end submit new post page too. Is there any way to attach the custom field as additional field into my current form ? I hope this make sense.
Thanks for the clarification!
So your new post form, are you using
acf_form() for this or is it something you’ve put together yourself?
If it’s a custombuilt form maybe think about switching to acf_form() as you’d get all and any fields attached to the post type automatically and everything “just works” 🙂
Okay I see..
You can actually use the acf_form() function within your own form by setting the
form parameter to false.
Then you can also set either which specific fields or specific field groups you want to include.
So you should be able to keep your own setup while still using acf_forms simplicity 🙂 Have a look at the parameters found on the link i posted above.
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
Sorry for the issues with ACF's API SSL certificate this morning. We've resolved it and your activations and downloads should be back to normal again. Thanks! ^LG— Advanced Custom Fields (@wp_acf) November 2, 2022
© 2022 Advanced Custom Fields.