Forums

Mandatory fields with more submit button

enzo.orsi 04 Jan, 2016
Hello,
I created the attached form with 2 pages (both loaded in the event) with all fields mandatory.
First field should be mandatory for first button, second block of fields should be mandatory for second button.
It is working perfectly with first button, but with second button validation for mandatory is not working
GreyHead 04 Jan, 2016
Hi enzo.orsi,

A two page form with a Submit button on each page should work OK. Please post a link to the form so I can take a quick look.

Bob
enzo.orsi 04 Jan, 2016
Unfortunately it is quite complicated to give you the URL...you should fill a lot of forms, be registered and pay with PayPal also🙂
I can give you here enclosed the form...

Pages 2 and 3 (Conferma and Fattura).
Event opzioni_conferma

This is private content

GreyHead 04 Jan, 2016
Hi enzo.orsi,

I've restored the form OK - but can't see exactly how it is supposed to work, or where the validation problem is occurring. I can see that in several places you have several HTML (render form) actions in the same event. I'm pretty sure that will not work as you expect as you will have three separate sets of <form> tags.

Bob
enzo.orsi 04 Jan, 2016

Hi enzo.orsi,

I've restored the form OK - but can't see exactly how it is supposed to work, or where the validation problem is occurring. I can see that in several places you have several HTML (render form) actions in the same event. I'm pretty sure that will not work as you expect as you will have three separate sets of <form> tags.

Bob


Thanks Bob.
Exactly, mainly in the events I need to load page 2 and 3...that's why I put more html render.
So, in the same event I will have page 2 and 3 (also 4, but it does not matter now).
Submit in page 2 is working perfectly, submit in page 3 does not check the validation (mandatory) for the fields inside page 3...
GreyHead 04 Jan, 2016
Hi enzo.orsi,

Yes you have done that and it doesn't work as they are effectively 'separate' forms. I'm not clear why you are adding these three separate blocks of code but the way to do it is probably to use containers with a single HTML (Render form) action. If you need to control the display of the blocks you can do that with CSS and/or JavaScript.

Bob
This topic is locked and no more replies can be posted.