We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18367
    • 834 Posts
    I’ve got eform and eform2db working, but at the moment all my fields are required.

    How do I make some of them optional?

    I know it’s a basic question, but that’s where I’m starting from.

    Thanks

      Content Creator and Copywriter
      • 30223
      • 1,010 Posts
      Read the eForm documentation in assets/snippets/eform/eform.htm

      <input type="whatever" eform="Description:Type:Required(0 or 1):error message:validation rule" etcetera />
        • 18367
        • 834 Posts
        Thank TobyL,

        the documentation was the first thing I read, but not being a programmer it’s often hard to understand which bit is relevant.

        I can usually get most things working, but my php skills are very basic. Usually I just need to be pointed at the relevant bit to figure it out, although worked examples always help.

        Anyway, if I understand it, the solution is to change the "1" to"0" . Anyway that’s what I did and it worked.

                <label for="cfpriority">Priority:
                <input name="priority" id="cfpriority" type="text" value="[+priority+]" eform="priority::0" /></p></label>  


          Content Creator and Copywriter
          • 30223
          • 1,010 Posts
          Yep, that’s it. smiley