We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25663 MODX Staff
    • 12,272 Posts
    How do you validate a textarea for a proper response?
      Ryan Thrash, MODX Co-Founder
      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
      • 11017
      • 12 Posts
      Ok, so now I’ve tried this and I can’t get it to work. I don’t mind adding REGEXP:s or whatever. As long as I can get this to work....like NOW tongue
      Here’s the code:
                  <select name="foo[]" size="6" multiple="multiple" eform="::0::#REGEX /^.+$/">
                      <option value="1">One</option>
                      <option value="2">Two</option>
                      <option value="3">Three</option>
                      <option value="na">n/a</option>
                  </select>
      


      Quote from: TobyL at Mar 23, 2007, 09:42 PM

      Just tried this myself, when I add brackets to a select-name I can’t get it to validate(this is my biggest gripe with eForm, not being able to turn off validation).

      I’ll look into this again and see if I can replicate the problem and find and answer to this.

      As far as your gripe is concerned,... One of the aims of eForm is exactly to make sure forms are validated. And with as little effort as possible. Off course this doesn’t work always as envisaged (we have our limits too). That’s why we keep developing. And you can turn off the validation sort off,... set a rule for the select box yourself and it will overide the default generated rule. If you set the rule to #REGEX /^.+$/ for instance anything will be allowed...