Support

Account

Home Forums Front-end Issues "Non unique ID"-problem for hidden ACF fields when using multiple forms on page

Solving

"Non unique ID"-problem for hidden ACF fields when using multiple forms on page

  • Hi there!

    I’m using several ACF frontend forms on the same page in a user profile system I’m setting up, and am faced with a problem: ACF does not seem to have a default built-in way of creating unique field IDs and names for its default fields when several forms are placed on one page.

    So I get issues like this:

    • [DOM] Found 23 elements with non-unique id #_acf_changed:
    • [DOM] Found 23 elements with non-unique id #_acf_form:

    I am setting up the forms using unique IDs in the acf_form() function.

    How can I remedy this issue?

    Thank you!

    Eivind

  • Hello,

    I ran into the exact same problem. Did you ever find a solution for this?
    Those hidden input ids should probably be prefixed with the form id, but they are not…

    Any help or suggestions to a workaround would be greatly appreciated.

  • I also have this problem. Has there been no effort to address this issue in the last year and a half?

  • There currently isn’t a way to address this. These hidden fields are uses in AJAX and PHP code when a form is submitted. They need to be available in each form. If they were prefixed then JS and PHP would not be able to easily use them.

    Are these forms that must be separate forms with their own submit button? Do they all create and update the same WP object? A single form with all of the fields combined would currently be the only way to solve this issue.

    I suggest that anyone needing to have multiple form on a page contact the developer here https://www.advancedcustomfields.com/contact/

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

The topic ‘"Non unique ID"-problem for hidden ACF fields when using multiple forms on page’ is closed to new replies.