Support

Account

Home Forums Front-end Issues Multi Page Front End Form

Solving

Multi Page Front End Form

  • 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.

    Any ideas?
    Thanks

  • It might be easiest to do this by using JavaScript to check the state of a form, and hide/show certain form elements depending on what the state is.

  • @joelstransky

    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)

The topic ‘Multi Page Front End Form’ is closed to new replies.