I’m trying to come up with a good approach to making multi-page front end forms.
So far I’m thinking I can just check to see if certain fields have values and pass a separate form group id to acf_form() if they do. Not sure if that’s error prone.
Another thought is a checkbox field that I don’t pass to acf_form’s field list and instead set it during acf/pre_save_post.
I think you’re pretty much there.
You could set up each acf_form depending on a GET parameter (lets say step) so you’ll just check the step parameter and show a different form group for each step.
If the form is supposed to submit a new post you’d probably have to find a way to send the new post id along from the first step to the subsequent ones.. I’m not sure you can do this by ACF.. there’s the %post_url% parameter for the redirect and perhaps there’s a %post_id% as well. Otherwise you could look into hooking in before ACF does it’s redirect and do it yourself and find the post ID to send along with it..
Viewing 3 posts - 1 through 3 (of 3 total)
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
After @keithdevon mentioned building out an accessible @wp_acf accordion block I went through my starter theme, setup a new site and just tabbed through it... try it, you'll end looking at your websites in a completely different light! Fully accessible navigation and content now.