We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1849
    • 1 Posts
    Hai,
    I want to set the email validation in the form.If i send any email it will not go to the user who have account in "yahoo,gmail,hotmail,redif,in". I need to send business email only. How can i set this validation and where i have to set? I wrote one function in php for this, but i dont know where i need to place that function.
    Please reply for this.

    Thanks
    Abi
      • 3749
      • 24,544 Posts
      It depends on what you are using to send the email -- eForm, SPForm, or your own custom code.

      SPForm (and I think eForm) have some JavaScript validation code that you could modify to do the check before the user leaves the page. You could look at their code to see how it’s done.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 38685
        • 59 Posts
        I think storing $_SESSION variables so that I can reload the page
        or using javascript to pre-validate the Form

        is what we need to do...
        but I don’t quite know how to implement!

        I have a piece of code attached that is an example on how to store session variables in php
        but I don’t know how to implement in Modx....
          Paul AL Bakulich - Association for Computing Machinery Professional Member
          http://palbakulich.me/ | http://twitter.com/#!/palhmbs