We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22683
    • 41 Posts
    How to disable validation for name? huh





    Regards

    Syu11 smiley
      • 33337
      • 3,975 Posts
      Please see the eform tag in the form template chunk, rg. eform="Name:string:1" ... make the last "1", "0" and you are good.

      For detailed information please consult eform docs.
        Zaigham R - MODX Professional | Skype | Email | Twitter

        Digging the interwebs for #MODX gems and bringing it to you. modx.link
        • 22683
        • 41 Posts
        Quote from: zi at Jul 21, 2009, 03:54 AM

        Please see the eform tag in the form template chunk, rg. eform="Name:string:1" ... make the last "1", "0" and you are good.

        For detailed information please consult eform docs.

        Yes, previously I change 1 to 0.. but not work huh

        this my template chunk :

        <label accesskey="n" for="name" class="lbleForm">Name</label><input type="text" name="name" maxlength="60" eform="Your Name::0:Expected at least two words:#REGEX /^\w+\s\w+/i" /><br /><br />


        and I call :

        [!eForm? &formid=`feedbackForm` &to=`[email protected]` &tpl=`eFeedBackForm` &report=`eFeedbackReport` &thankyou=`eFeedbackThanks` &vericode=`1` &subject=`Open Writer`!]





        Regards,

        Syu11 smiley
          • 1343 ☆ A M B ☆
          • 2,213 Posts
          If you want to remove the two word check do this:

          eform="Your Name::0:Expected at least two words:#REGEX /^\w+\s\w+/i"

          eform="Your Name::0:"

          That should fix the problem
            Patrick | Server Wrangler
            About Me: Website | Tweets |  MODX Hosting
            • 22683
            • 41 Posts
            Thanks AMDbuilder smiley

            I understand to be more use eForm..

            But i have another question..

            I have form phone which format integer.. :

                <label accesskey="s" for="phone" class="lbleForm">Phone</label><input name="phone" type="text" eform="Your Phone:integer:1::" /><br /><br />
            


            but i have problem with result form phone..

            example : if i input "012345678901" then result is "12,345,678,901".. huh

            i want result same with input smiley


            Regards,

            Syu11
              • 1343 ☆ A M B ☆
              • 2,213 Posts
              Give Float a try.
                Patrick | Server Wrangler
                About Me: Website | Tweets |  MODX Hosting
                • 22683
                • 41 Posts
                Quote from: AMDbuilder at Jul 22, 2009, 01:00 AM

                Give Float a try.

                The result is better than using integer.. but it’s OK! grin

                0123456789 = 12345678901.00

                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  Usually phone numers are strings. In many countries phone numbers have letters or other non-numeric characters. You can test for valid characters using is_numeric if you want the string to be all numbers, or use a regular expression if it can have hyphens or parentheses (916) 558-9943 for example.
                    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