We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18339
    • 14 Posts
    The FormIt docs are not clear on error messages. With dafyk’s help on the IRC channel, I figured out that I can get FormIt to display an error per required field.

    However, I have a very complex form with a lot of required fields. The background color of the required fields is different than the other fields. All I need is the ability to display a message such as "All required fields were not answered. Please make sure to fill out all fields with a yellow background are filled out, and try to save the form again."

    I’ve been told that I can install the if package and put together a complex query where I check ~30 fields for FormIt error messages, but it just seems to me that FormIt is doing it already but I don’t know how to access the generic message.

    Once I figure this out, I can help to put better docs together for FormIt, but the error documentation is insufficient to answer this question.

    I hope somebody can help me out here. Thanks.
      • 28215
      • 4,149 Posts
      Look into:

      [[!+fi.validation_error]] /* 1 or 0 if there is an error */
      [[!+fi.validation_error_message]] /* a message of all errors */
      
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com