Emailform without losing data with captcha error.

Issues related to forms.
User avatar
Navaldesign
 
 
Posts: 1051
Joined: Sat Mar 01, 2008 8:08 pm
Location: Italy
Contact:

Emailform without losing data with captcha error.

Post by Navaldesign » 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): viewtopic.php?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): viewtopic.php?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 viewtopic.php?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.
Last edited by Navaldesign on Mon Nov 09, 2009 9:37 am, edited 5 times in total.
www.dbtechnosystems.com

razorboy
 
 
Posts: 12
Joined: Sat Nov 15, 2008 7:04 pm
Location: Canada

Post by razorboy » Wed Jan 14, 2009 8:44 pm

Thank you very much.

User avatar
Navaldesign
 
 
Posts: 1051
Joined: Sat Mar 01, 2008 8:08 pm
Location: Italy
Contact:

Post by Navaldesign » Sun Feb 15, 2009 8:54 am

Not sure what you mean. The form in these projects accept the characters as the users type them, they don't force any case sensitiveness, IF however you want to do something like this, you should use some Javascript.
www.dbtechnosystems.com

User avatar
misterjones
 
 
Posts: 18
Joined: Sat Aug 09, 2008 11:50 am
Location: South Africa
Contact:

Post by misterjones » Mon Jul 06, 2009 11:28 am

Thanks for this just a question where do I get the capcha.php file from

User avatar
Navaldesign
 
 
Posts: 1051
Joined: Sat Mar 01, 2008 8:08 pm
Location: Italy
Contact:

Post by Navaldesign » Mon Jul 06, 2009 11:48 am

WB6 has a built in captcha tool, so simply use it.
www.dbtechnosystems.com

User avatar
misterjones
 
 
Posts: 18
Joined: Sat Aug 09, 2008 11:50 am
Location: South Africa
Contact:

Post by misterjones » Mon Jul 06, 2009 2:45 pm

Thanks got it

User avatar
me.prosenjeet
 
 
Posts: 1257
Joined: Mon Dec 24, 2007 1:50 pm
Location: Lucknow
Contact:

Post by me.prosenjeet » Sun Mar 07, 2010 6:40 pm

Naval,
Due to some reason I am unable to use the DBTS form processor and have to use the conventional WB form. In anyway, I can add this form data retreival system in V6.5? With this version, is the process any simple or I have to do all that I see in the project you have for download for V5?

User avatar
Navaldesign
 
 
Posts: 1051
Joined: Sat Mar 01, 2008 8:08 pm
Location: Italy
Contact:

Post by Navaldesign » Sun Mar 07, 2010 6:54 pm

Not sure what you mean me... Pls clarify.
www.dbtechnosystems.com

User avatar
me.prosenjeet
 
 
Posts: 1257
Joined: Mon Dec 24, 2007 1:50 pm
Location: Lucknow
Contact:

Post by me.prosenjeet » Sun Mar 07, 2010 7:06 pm

I mean the demo project that is included in your download mentions it to be for V5, with version 6.5 do we need to do the same things as in the project or it can be made more simplified now?

User avatar
Navaldesign
 
 
Posts: 1051
Joined: Sat Mar 01, 2008 8:08 pm
Location: Italy
Contact:

Post by Navaldesign » Sun Mar 07, 2010 7:12 pm

No, it is the same (more or less).
I don't quite understand what you mean by "more simplified".

I simply created the last version with Extension Builder 2.03 so you need WB6.5 . I believe that the sub-version is not important.

Unfortunately, more features a script has, more work you need to set it up. The upcoming version 3.01 has more than 140 properties ! But it DOES a lot of things: PHP validation, MySQL datatypes, Departments, Banned IPs and Email addresses, in-line user codes, Calculations, etc. NOT setting some properties simply means that they will be ignored and the relevant functions disabled.
www.dbtechnosystems.com

User avatar
Rebel Studio
 
 
Posts: 116
Joined: Tue Nov 04, 2008 10:55 pm
Location: NL

Re: Emailform without losing data with captcha error.

Post by Rebel Studio » Sat Dec 04, 2010 7:39 am

He means the captcha code :D

Does the email form still work in wb7 cause not losing data is very important for me :)

edit: it is not loading for me in wb7

jeff11214
 
 
Posts: 74
Joined: Sat Oct 28, 2006 4:22 pm

Re: Emailform without losing data with captcha error.

Post by jeff11214 » Wed Jul 27, 2011 2:19 am

I think my problem is simple, but I can not resolve it. I dowloaded your zip for the WB5 project, however I'm using WB7.
I removed a few fields from the form and changed the form name, but otherwise it is your form.
I changed the Form Name "Action" to reflect the same name.
I changed the Confirm Page HTML to do to my e-mail.

My problem is I get the following message "The verification code you have entered is not correct! Please go back and try again."

When I use my url in the HTML properties on the form page, then no captcha appears. If I leave your URL then the captcha appears, but I get the error message as stated above.

How can I make this work?
http://helpcureleukemia.org/hcl/silent.php

User avatar
Navaldesign
 
 
Posts: 1051
Joined: Sat Mar 01, 2008 8:08 pm
Location: Italy
Contact:

Re: Emailform without losing data with captcha error.

Post by Navaldesign » Wed Jul 27, 2011 5:10 am

If you look at the captcha code, you will see:

<img src="http://www.dbtechnosystems.com/wb5/captcha.php" alt="Click for new image" title="Click for new image" style="cursor:pointer" onclick="this.src='http://www.dbtechnosystems.com/wb5/capt ... m()"></div>


In other words, it is still the captcha referring to my own site.

You should replace this with your own:


<img src="http://helpcureleukemia.org/hcl/captcha1.php
" alt="Click for new image" title="Click for new image" style="cursor:pointer" onclick="this.src='http://helpcureleukemia.org/hcl/captcha ... m()"></div>

Double click the HTML box that produces the captcha and change the code.

Please note that this is a rather old post. You can now use the DBTS Form Processor which can preserver the submitted values.

Related thread:

viewtopic.php?t=20732
www.dbtechnosystems.com

jeff11214
 
 
Posts: 74
Joined: Sat Oct 28, 2006 4:22 pm

Re: Emailform without losing data with captcha error.

Post by jeff11214 » Wed Jul 27, 2011 2:14 pm

I used your download because I liked the template.
The captcha now shows, but I get the same error message when trying to submit.
"The verification code you have entered is not correct! Please go back and try again."

mhn-pc
 
 
Posts: 23
Joined: Wed Feb 09, 2011 3:48 pm
Location: Asia
Contact:

Re: Emailform without losing data with captcha error.

Post by mhn-pc » Thu Sep 01, 2011 5:12 pm

Hi Navaldesign,

I have a question about of Emailform without losing data with captcha error !
I downloaded the wb5_memory_form.zip file.

When that entering the confirm.php page (for example: http://www.dbtechnosystems.com/wb5/confirm.php), comes the first page (index.php).
How is this done ?

Please guide !

Post Reply

Who is online

Users browsing this forum: BethlehemOffice and 4 guests