We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • though this discuss is a year old, it's amazingly useful to me at this time in 2012. And I can only say 'THANK YOU and GOD BLESS'

    @lossendae and togi_one: the solution only works where there is some entry but a wrong type. Say, text where you should have numbers. I would like to have a situation where the red borderline is enabled when there is an error in that field, whether empty or taking a wrong value.

    I tried [[+fi.error.first_name:then=` warning`]], that didn't help
      • 19389
      • 11 Posts
      What I do to output a "error" class:

      <form>
      ...
      
      <div class="formDiv formText [[!+fi.error.fSurname:notempty=`error`]]">
      	<label for="foptSurname">Name</label>
      	<input id="foptSurname"
      		name="fSurname" 
      		type="text" 
      		value="[[!+fi.fSurname]]" />
      	[[!+fi.error.fSurname]]
      </div>
      
      ...
      </form>
      


      ...and then style the class to your hearts content. Hope this helps, too.