show colour in fields with case of Rule error

2 months ago

matc1
Member | 17
+
0
-

Hi, i'm using Validation in form,i'm using addRule().. everything is ok, but my form contain a lot of form fields , is it possible to change the label field colour or the fields border in case of error?
Thanks

2 months ago

David Matějka
Moderator | 6159
+
0
-

Hi, do you use manual or automatic form rendering?

2 months ago

matc1
Member | 17
+
0
-

David Matějka wrote:

Hi, do you use manual or automatic form rendering?

Hi David, i use “Standalone Forms” with bootstrap 4 like the examples
“bootstrap4-rendering.php”.
Thanks

2 months ago

David Matějka
Moderator | 6159
+
0
-

so you are rendering just using echo $form?

this renderer should already be configured to set has-danger class on form-group div and is-invalid class on an input.

2 months ago

matc1
Member | 17
+
0
-

David Matějka wrote:

so you are rendering just using echo $form?

this renderer should already be configured to set has-danger class on form-group div and is-invalid class on an input.

Thanks a lot David, so i' dont need to include “netteForms.js” in my main page?
I will check my code.
Thanks best regards.