CodeIgniter Forums
unwanted novidalidate attribute in form - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11)
+--- Thread: unwanted novidalidate attribute in form (/showthread.php?tid=70288)



unwanted novidalidate attribute in form - neuron - 03-20-2018

hi, 

When I use form_open with attributes as below:
PHP Code:
form_open('auth/reset_password/' $code, array('class' => "forget-form"'style' => "")) 
it outputs
PHP Code:
<form class="forget-form" action="auth/forgot_password" method="post" style="" novalidate="novalidate"
 Why is there novalidate tag in form?
and how to get rid of it?


RE: unwanted novidalidate attribute in form - php_rocs - 03-20-2018

@neuron,

I use that code in my forms and it does not do that. What version of CI are you using?


RE: unwanted novidalidate attribute in form - jreklund - 03-20-2018

Are you using a JavaScript based validation tool? If so that's what's adding novalidate="novalidate" so that the browser don't validate your form, but your JavaScript takes priority.


RE: unwanted novidalidate attribute in form - neuron - 03-20-2018

(03-20-2018, 08:03 AM)jreklund Wrote: Are you using a JavaScript based validation tool? If so that's what's adding novalidate="novalidate" so that the browser don't validate your form, but your JavaScript takes priority.

Thanks jreklund, shame on me  Blush  . I should guess it. I am using Metronic Dashboard template. It's JS put those attributes.