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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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.
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
"Is the 'email' type accepted for that version? "
I'm not sure what you are asking here!
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