Subscription form does not highlight mandatory field

Asked

Viewed 75 times

0

I have a form where you have a signature field, follow code:

  <script src="signature/jquery.signaturepad.js"></script>
  <script>
    $(document).ready(function() {
      $('.sigPad').signaturePad({drawOnly:true});
    });
  </script>
  <script src="signature/assets/json2.min.js"></script>

This field is mandatory! What I need is for it to be marked in red in case someone tries to send the form without signing. The person cannot send if they do not sign, but they do not show, as in other fields, that they are red if they are not filled.

In short, I just want to put the red border in this field, to point out that it was not filled, when to send.

Follow the HTML section

<div class="row">
<div class="col-sm-12 form-group">
<label for="name"> Assinatura:</label>

                                <ul class="sigNav">
                                  <li class="clearButton"><a href="#clear">Limpar</a></li>
                                </ul>
                                <div class="sig sigWrapper">
                                  <center><canvas class="pad" width="390" height="150"></canvas></center>
                                   <input required type="hidden" name="assinatura" id='assinatura' class="output">
                                </div>
                            </div>
                        </div>
  • And how is Html?

  • I updated it, put it in the post

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.