Page 1 of 1

Form Builder and Validation methods

Posted: Thu Jan 23, 2014 1:00 am
by boonier
Hi

I'm having a bit of an ordeal with HTML5 constraints validation kicking in because the form elements generated in the template automatically have the 'required' attribute rendered in all the required tags.

This is causing a kind of half-way house of validation where the browser does one bit, and the JS or Form Builder server-side is doing the other. It's leading to a messy user experience. The HTML5 validate only seems to work on the <input> tags.

Is there a way to stop FB rendering the 'required' attribute? Or, a way to stop the browser kicking in with it's own? This example is managing it:

https://www.cmscanbesimple.org/demo/for ... r-template

thanks

*** edit ***
ok so <form novalidate> will stop the browser interfering but the module seems to put its own <form> header in...

Re: Form Builder and Validation methods

Posted: Thu Jan 23, 2014 8:00 am
by velden
boonier wrote: *** edit ***
ok so <form novalidate> will stop the browser interfering but the module seems to put its own <form> header in...
Quick and dirty:

Code: Select all

{FormBuilder whateveryouhaveherenow|replace:'<form>':'<form novalidate>'}