close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

server validation doesn't remember original data entered

Thread began 6/12/2011 4:07 pm by webassist144944 | Last modified 6/16/2011 9:55 am by Jason Byrnes | 1954 views | 13 replies |

webassist144944

server validation doesn't remember original data entered

I have built a form. When I fill out half of the required fields and submit, it does the server validation, and returns back to the page and displays which fields need data. But the original data that was entered into the text fields is now gone, so the user has to re-enter everything over again.

How can this data be remembered upon an incomplete form submission after validation?

contact_captcha_test.php

Sign in to reply to this post

Jason ByrnesWebAssist

in design view, select each form element.

in the property inspector, click the lightning bolt next to initial value and select the corresponding item from the Validated Entries binding group.

Sign in to reply to this post

webassist144944

still doesn't work

Thanks for your response. I did as you said, however it is still not returning the entered values. You can test yourself and view the code.

contact_captcha_test.php

Thanks!

Sign in to reply to this post

Jason ByrnesWebAssist

please send a copy of the contact_captcha_test.php page in a zip archive so i can view the raw php code.

Sign in to reply to this post

webassist144944

zipped php file

Here you go!

Attached Files
contact_captcha_test.php.zip
Sign in to reply to this post

Jason ByrnesWebAssist

the initial value of the form elements is set to use the POST collection.

You need to use the validated entries collection instead.

On the bindings panel, you should see a binding group titles validated entries. this binding group is set to contain the post for any form elements that pass when validation when one of them fails.

set the initial value of the form, elements to use the corresponding validated entries binging.

Sign in to reply to this post

webassist144944

Still not working...

I again did what you said, but still it does not work.

Here is the updated file.

Attached Files
contact_captcha_test.php.zip
Sign in to reply to this post

Jason ByrnesWebAssist

the code looks correct this time, there are 2 possibilities:

1) a php error is occurring on the page:
add the following code at line 1 to turn error reporting on:

php:
<?php
error_reporting
(E_ALL);
ini_set('display_errors','on');
?>




2) The server is not storing session variables properly, use the sessionTest page from the following thread to test the servers session management:
showpost.php?p=23826&postcount=2

also, try adding the following code just before the </body> tag on the contact page:

php:
<pre><?php var_dump($_SESSION); ?></pre>
Sign in to reply to this post

webassist144944

early rograr

Here is the test and the test runs fine, no issues.

sessionTest.php

I added the code in the header, the page still doesn't work. When I add the code you provided to right before the /body tag, the page is blank and does not load at all.

<?pre><?php var_dump($_SESSION); ?><pre>

is giving me a syntax error....

Sign in to reply to this post

Jason ByrnesWebAssist

sorry the code to add before the <body> tag is:

php:
<pre><?php var_dump($_SESSION); ?><pre>
Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...