We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23428
    • 27 Posts
    I’m creating a form in modx 0.9.6.3 and having problems with validation for the select option. How do I code so that that a selection is required other than the ’please select’ otpion?

    eg:
    <p>Number of dedicated HR staff :</p>
    <select name="HRStaffNo" eform="Number of HR staff::1" />
    <option selected="selected">Please select...</option>
    <option value="staff1">1</option>
    <option value="staff2">2</option>
    <option value="staff3">3</option>
    <option value="staff4">4</option>
    </select>

    I’m sure it’s very simple but I can’t find any information online about validation; does anyone have any ideas or can point me to any articles describing validation in more detail than what’s on wiki?
      • 4310
      • 2,310 Posts
      You could try :
      <p>Number of dedicated HR staff :</p>
      <select name="HRStaffNo" eform="Number of HR staff:string:1" />
      <option value="">Please select...</option>
      <option value="staff1">1</option>
      <option value="staff2">2</option>
      <option value="staff3">3</option>
      <option value="staff4">4</option>
      </select> 
        • 23428
        • 27 Posts
        That’s it! THANK YOU rolleyes
          • 4310
          • 2,310 Posts
          I’m sure it’s very simple
          See, you were right.
            • 23428
            • 27 Posts
            too simple to see you see laugh