• Is it possible to highlight a missing ‘required field’ on form submission, rather than showing the ‘One or more fields have an error. Please check and try again.’

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Where can we see the website in question?

    @div123 Are you referring to having the field display something like a red outline showing the field was left empty?

    Thread Starter div123

    (@div123)

    Yes, just something that shows which required field is empty.

    @div123 each required field will get the class ‘wpcf7-not-valid’ if it doesn’t pass validation on submit. So I basically throw anything in my CSS to highlight such as

    .wpcf7-not-valid {
    border: 2px solid red;
    }

    But you can really go crazy with creativity and highlight it tons of different ways since it gets a specific class added to it when it fails validation.

    • This reply was modified 1 month, 1 week ago by nate.ads.
Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.