Emailform without losing data with captcha error.
Posted: Thu Oct 30, 2008 11:26 am
Emailform without losing data with captcha error.
Here is the example: http://www.dbtechnosystems.com/wb5/index.php
and here is the link to download the WB5 project: http://www.dbtechnosystems.com/wb5/wb5_memory_form.zip
Open the project. Edit the code in the "confirm" page, to have your own domain name details and email address.
Remeber that you need to change the url of the captcha, according to your own domain/folder
The code that processes the form is a variation of the WB5 built in form processor that allows the error page to display the errors encountered (email address validation, captcha code validation, injection attack attempts).
Please also note that all pages (form page, error page, confirm page) MUST be published as php.
Please note that your goal can be acheived far more easier if you use the DBTS Form Processor Extension, which has this feature built in (as well as other cool features): http://www.wysiwygwebbuilder.com/forum/ ... hp?t=20732
---------------------------------------------------------------------------------
Preview or Confirmation Page: Transfer the data submitted from a form to the thankyou page.
It is quite easy, however, no efficient page formatting can be done with the built in form processor.
Below look at how this can be done, using the modified code of the built in form processor. The advantage of this method is that you can create ANY formating of the thank you /confirm) page using WB5: font size, type, color, style, placement, ANYTHING. You can also put the variables in tables so you can create a sort of Invoice or Order preview just as a real commercial printed form. Your visitor can also print out the page (in that case avoid too many graphics and coloured backgrounds).
Working Demo: http://www.dbtechnosystems.com/wb5/data_merge_form.php
Link to download the zip with the WB5 project:
http://www.dbtechnosystems.com/wb5/wb5_ ... e_form.zip
Please note that this is just an example of how you can do it.
Also, combining the method/script here with the one described above
you can create a "remembering" form, with data merging, and also a "Preview" page that users may check for errors, and the submit (two step submission)
The Preview is highly recommended if this is going to be an Invoice or Order, and the two step submission is almost a "MUST" in these cases.
Please note that your goal can be acheived far more easier if you use the DBTS Form Processor Extension (Preview Object), which has this feature built in (as well as other cool features): http://www.wysiwygwebbuilder.com/forum/ ... hp?t=20732
----------------------------------------------------------------------------------
Form submitting to different email addresses (Departments) depending on visitors selection .
It takes care of multipe departments (actually unlimited...) using a dropdown.
You can test it at http://www.dbtechnosystems.com/wb5/contact_multiple.php
And you can download it at http://www.dbtechnosystems.com/wb5/mult ... tments.wbs
Please note that this script combines the method described in http://www.wysiwygwebbuilder.com/forum/ ... hp?t=14938 with your requirements.
The code in the form page Start of Page should not be changed. Neither should the value of the hidden field.
The processing script is in the page confirm1.php
Please note that you will need to add here the email addresses. You will see the code:
$subject = 'New Submission from our Multiple Department Website form';
$message = 'Values submitted from web site form to department: '.$_POST['department'];
$error_url = 'errorpage1.php';
$address[Sales] = "sales@yourdomain.com";
$address[Assistance] = "assistance@yourdomain.com";
$address[Accounting] = "accounting@yourdomain.com";
$department_error = "Invalid department selection!<br>";// You can change this as required
Customize the parts in red as required.
Please note that i have used three departments in the listbox: Sales, Assistance, Accounting merely as EXAMPLES.
The values in the square brackets MUST be exactly as the values in the form combobox. The email addresses MUST be, for each one, the email address where you want the mail to be sent.
You can also cusomize the Subject, start of the message, and the error that will be displayed (though it NEVER should) if the email address is not found due to a mistype.
Here is the example: http://www.dbtechnosystems.com/wb5/index.php
and here is the link to download the WB5 project: http://www.dbtechnosystems.com/wb5/wb5_memory_form.zip
Open the project. Edit the code in the "confirm" page, to have your own domain name details and email address.
Remeber that you need to change the url of the captcha, according to your own domain/folder
The code that processes the form is a variation of the WB5 built in form processor that allows the error page to display the errors encountered (email address validation, captcha code validation, injection attack attempts).
Please also note that all pages (form page, error page, confirm page) MUST be published as php.
Please note that your goal can be acheived far more easier if you use the DBTS Form Processor Extension, which has this feature built in (as well as other cool features): http://www.wysiwygwebbuilder.com/forum/ ... hp?t=20732
---------------------------------------------------------------------------------
Preview or Confirmation Page: Transfer the data submitted from a form to the thankyou page.
It is quite easy, however, no efficient page formatting can be done with the built in form processor.
Below look at how this can be done, using the modified code of the built in form processor. The advantage of this method is that you can create ANY formating of the thank you /confirm) page using WB5: font size, type, color, style, placement, ANYTHING. You can also put the variables in tables so you can create a sort of Invoice or Order preview just as a real commercial printed form. Your visitor can also print out the page (in that case avoid too many graphics and coloured backgrounds).
Working Demo: http://www.dbtechnosystems.com/wb5/data_merge_form.php
Link to download the zip with the WB5 project:
http://www.dbtechnosystems.com/wb5/wb5_ ... e_form.zip
Please note that this is just an example of how you can do it.
Also, combining the method/script here with the one described above
you can create a "remembering" form, with data merging, and also a "Preview" page that users may check for errors, and the submit (two step submission)
The Preview is highly recommended if this is going to be an Invoice or Order, and the two step submission is almost a "MUST" in these cases.
Please note that your goal can be acheived far more easier if you use the DBTS Form Processor Extension (Preview Object), which has this feature built in (as well as other cool features): http://www.wysiwygwebbuilder.com/forum/ ... hp?t=20732
----------------------------------------------------------------------------------
Form submitting to different email addresses (Departments) depending on visitors selection .
It takes care of multipe departments (actually unlimited...) using a dropdown.
You can test it at http://www.dbtechnosystems.com/wb5/contact_multiple.php
And you can download it at http://www.dbtechnosystems.com/wb5/mult ... tments.wbs
Please note that this script combines the method described in http://www.wysiwygwebbuilder.com/forum/ ... hp?t=14938 with your requirements.
The code in the form page Start of Page should not be changed. Neither should the value of the hidden field.
The processing script is in the page confirm1.php
Please note that you will need to add here the email addresses. You will see the code:
$subject = 'New Submission from our Multiple Department Website form';
$message = 'Values submitted from web site form to department: '.$_POST['department'];
$error_url = 'errorpage1.php';
$address[Sales] = "sales@yourdomain.com";
$address[Assistance] = "assistance@yourdomain.com";
$address[Accounting] = "accounting@yourdomain.com";
$department_error = "Invalid department selection!<br>";// You can change this as required
Customize the parts in red as required.
Please note that i have used three departments in the listbox: Sales, Assistance, Accounting merely as EXAMPLES.
The values in the square brackets MUST be exactly as the values in the form combobox. The email addresses MUST be, for each one, the email address where you want the mail to be sent.
You can also cusomize the Subject, start of the message, and the error that will be displayed (though it NEVER should) if the email address is not found due to a mistype.