Form helper - novalidate |
Maybe I'm wrong but using the form helper it's impossible to specify single attributes. Today I wanted to use "novalidate" so far I have not figured out how to fix it.
(06-26-2018, 12:16 PM)php_rocs Wrote: @Nome, Oh sure: Code: <form ... novalidate>...</form> Example: PHP Code: <?= form_open_multipart('answer/add', array('class' => 'needs-validation', 'but no validate ?'));?>
Hi, to do that you can pass your attributes to the form as an array like this:
PHP Code: <?php $attributes = array('name' => 'answer_add', 'autocomplete' => 'off', 'class' => 'needs-validation', 'novalidate' => 'novalidate'); ?> The result should be something like this: Code: <form action="http://your-url/index.php/answer_add" name="answer_add" autocomplete="off" class="needs-validation" novalidate="novalidate" enctype="multipart/form-data" method="post" accept-charset="utf-8"> |
Welcome Guest, Not a member yet? Register Sign In |