• Resolved Chris

    (@moargh)


    Hi,

    I have a form with a certain ID twice on one page. The problem is when I submit one of these forms the validation is triggered on both of the forms. So even if one form is filled out correctly errors are shown because in the other form the fields are blank.

    Is there a way to only trigger the validation (and submit) on the form which is submitted?

    (Unfortunately a second form with the same fields is not an option.)

    Thanks in advance,
    Chris

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Where can we see the website?

    Thread Starter Chris

    (@moargh)

    Thanks for getting back to me so quickly.

    Unfortunately I currently don’t have a public link for testing but I will provide one asap.

    I just found out that multiple forms even with the same ID actually work – sorry for that. The problem is when using WPCF7 with the Ajax Load More plugin (ALM, https://connekthq.com/plugins/ajax-load-more/).

    The ID of the form which is loaded via ALM is not unique anymore but the same as the first one (in my case wpcf7-f5-o1). This causes the problem, doesn’t it?

    Do you have an idea how to maintain the ID logic (wpcf7-f5-o1, wpcf7-f5-o2, wpcf7-f5-o3, …) even when forms are loaded via ALM?

    • This reply was modified 5 years ago by Chris.
    • This reply was modified 5 years ago by Chris.
    Plugin Author Takayuki Miyoshi

    (@takayukister)

    The ID of the form which is loaded via ALM is not unique anymore but the same as the first one (in my case wpcf7-f5-o1). This causes the problem, doesn’t it?

    Right.

    Do you have an idea how to maintain the ID logic (wpcf7-f5-o1, wpcf7-f5-o2, wpcf7-f5-o3, …) even when forms are loaded via ALM?

    This question should be posted in that plugin’s support forum.

    Thread Starter Chris

    (@moargh)

    Hi,

    Thank you for clearing things up.

    I will ask the question in that forum but I would appreciate if you could have a look at the website on which the problem occurs:

    https://bit.ly/2pFchRh

    The list is expandable and each list item has a contact form. The first five work well but when the six’s is loaded none of the forms works anymore.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Multiple forms with same ID on same page’ is closed to new replies.