We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8425
    • 159 Posts
    Hello,
    I upgraded to eForm 1.4.4.6 but upon error validation the check boxes values are not being retained.
    Do I need to do something special. Here is my eform template:
     <input type="checkbox"  name="teaBreak" value="Tea Break Ordered"/> 

    Thanks for your help
      • 33337
      • 3,975 Posts
      I think you need to suffix [] to the name.

      eg. name="teaBreak[]"
        Zaigham R - MODX Professional | Skype | Email | Twitter

        Digging the interwebs for #MODX gems and bringing it to you. modx.link
        • 8425
        • 159 Posts
        Thanks for the reply I tried that but no avail...
        Anyone has another idea?
        Thanks
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Do you have the eform attribute added to the first checkbox?
          <input type="checkbox"  name="teaBreak" value="Tea Break Ordered" eform="fieldname::0" />

          or whatever values the eform attribute needs for your purposes.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 8425
            • 159 Posts
            Thanks Suzan, I tried several but I didn’t get the default values to be retained. I’m wondering if it works or maybe I just don’t know how to use it...
            I’m surprised nobody came across this is since this is very common behavior to have default values saved upon validation error. One doesn’t want to have to re-enter all the values everything time a validation error prevent the form from being submitted.
            Still looking.... I really need this one...
            Thank you
              • 8425
              • 159 Posts
              My mistake Suzan, I had something wrong in my eform using
              eform="fieldname::0"

              works fine to retain default values.
              Thanks all for your help....