What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Change the border color and background in case of error

    Asked by adharamoveis on September 08, 2014 at 10:34 AM
    I would like to know how do I change the color of the border and background of the text box (not the notification, but the box where we typed) when the field is blank or filled in incorrectly.

     

    Thanks for everything
    border color and style div thanks
  • Profile Image
    JotForm Support

    Answered by ashwin_d on September 08, 2014 at 11:40 AM

    Hello adharamoveis,

    Basically in case of validation error you need to display the border color and back ground of the form fields in a different color. Is that correct?

    I did check your last edited form and found that you have almost achieved your requirement except the background color of the text box. Please check the screenshot below:

    Please replace the injected custom css code from your form with the following custom css: 

    .form-line-error { background: transparent; }

    .form-line-error { color: #FFCC00; }

    .form-error-message, .form-button-error { display: none; }

    .form-label-left, .form-label-right, .form-label-top { display:none; }

    .form-line-error input:not(#coupon-input), .form-line-error textarea {

    border: 2px solid #FF3030;

    -moz-box-shadow: 0 0 0px #FF3030;

    -webkit-box-shadow: 0 0 0px #FF3030;

    box-shadow: 0 0 0px #FF3030;

    background-color: bisque;

    }

    Please change the "bisque" to any desired color. The following guide should help you in injecting the custom css code:  https://www.jotform.com/help/117-How-to-Inject-Custom-CSS-Codes 

    Hope this helps.

    Do get back to us if you need any other changes.

    Thank you!