Hi Matt,
I’m not sure why you are using three forms rather than just altering the style of a single form at each breakpoint. I think that would be far easier to manage than showing and hiding each of the forms.
Each call to the testFields function passes a reference to the form that was submitted using ‘this’. We can then use that reference to search for fields to validate that are just children of that particular form. Now when the form is submitted the testFields function will only validate the form you are submitting rather than all of them on the page.
As a side note you had a lot of duplicated JavaScript code in that page where the Action was writing the same code to the page each time it ran. I’ll make a note to log a bug against that.
Regards,
Tim.
On 9 Oct 2014, at 18:31, Matt wrote:
I have three send forms in responsive website all email fields at different media sizes.
when email is filled in at desktop size for example it still says “Please fill out all required fields with valid details.”
is there a way to ignore the other forms or a manual way to have ‘required’ only work at specific media size.
Hi Tim, Thanks for getting back, one form would be far better I agree. I used three forms as I wasn’t sure how to style the CSS for the table. I have tried
table {
width: 50%;
} at different breakpoints which works, but how do you style the row in a table from one row to two rows so ‘submit’ would drop below ‘email’
Hi Matt,
There are several ways to do what you want and they all require CSS to restyle the elements depending on the media query in use.
I’ll try and find time to put an example together for you later this week.
Regards,
Tim.
On 11 Oct 2014, at 11:50, Matt wrote:
how do you style the row in a table from one row to two rows so ‘submit’ would drop below ‘email’