Menu

Checking before processing

Help
Fernando
2008-04-22
2013-06-03
  • Fernando

    Fernando - 2008-04-22

    First, thanks for this fantastic tool. It is very easy to install and also, thanks to the messages to this forum, I was able to send messages in HTML format, add some formatting to the 'Thank you' page and the error messages.

    Now I am trying to do some checking within the form before sending the form details for processing.

    I use this:
    <form name='DEMAND' enctype='multipart/form-data' action='process.php' onsubmit='validate();' method='post'>

    the validate() function is a simple Javascript for checking if the mandatory fields are not empty and if the email looks ok. Nothing fancy.

    Now, for the testing. The field checking within the forms works ok but then it runs the "process.php" file and the error message from the php file appears. I want to check all the fields BEFORE sending them to the "process.php" file.
    Is that possible?

    Sorry for this long post
    Fernando

     
    • TNTEverett

      TNTEverett - 2008-04-22

      Yes, you have 2 choices.
      1.) Use the new version 3.0 Generator. 
      http://phpformgen.sourceforge.net/new_demo/phpformgen/
       
      2.) Create a sample form using the new generator and use the Java check functions as an example for modifying your own form from version 2.09. 

      Post again if you still need help.

       
    • Fernando

      Fernando - 2008-04-22

      Thank you for your help. After struggling with the code, I think is almost done. I am using the Java functions of the form generated by 3.0 with the only exception of the calendar functions, that I don't need.

      But I am still using 2.07. Is the 'email' type accepted for that version?

      Regards
      Fernando

       
      • TNTEverett

        TNTEverett - 2008-04-22

        "Is the 'email' type accepted for that version? "

        I'm not sure what you are asking here!

         
    • Fernando

      Fernando - 2008-04-22

      Sorry. I was having errors whenever I placed 'email' as fieldtype instead of 'text' but I tried it again and the error must be somewhere else because I did it again and now it works!

      Next step, I will try to add a more descriptive error message, specially when there is more than one error.

      Regards
      Fernando

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.