Home Forums Front-end Issues Front end editing, more than one ACF form?


Front end editing, more than one ACF form?

  • Hello, I’d like to know if anyone has figured out how to have more than one acf_form on a page for front end editing.

    The site I’m working on, I’ve created a dashboard. From this dashboard page, I’d like to give the user the ability to edit 2 other content items.

    I’ve tried registering 2 different forms using acf_register_form(), and it works. My issue is that the html shows errors for duplicate IDs used by the form elements that are generated.

    I could use jQuery to change the IDs after the page is rendered, but I’m not sure if that would throw off the form processing or not.

    Any help is appreciated, thanks in advance.

  • You can’t really use two forms that share the same fields on a single page. If these have different <form> wrappers then you either need to put up with the errors or put the forms on different pages. If they share a <form> wrapper then the forms will not work and you’ll update both posts with the values in the second occurrence of the fields. The other choice is to create two identical field groups and use one of them for each of the forms.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.