close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Server Validation is wiping recordset data values from form?

Thread began 6/10/2014 5:43 am by Nathon Jones Web Design | Last modified 6/12/2014 9:22 am by Jason Byrnes | 1123 views | 12 replies |

Nathon Jones Web Design

Server Validation is wiping recordset data values from form?

What should the default value be for form fields on an UPDATE form? I have them set to values from a recordset because it is linked from a "Edit Profile" button on a previous page. When the user clicks that button it takes them to the UPDATE form page and the recordset is populated by a hidden ID form element also passed from the previous page. That works, and the correct data is displayed in the UPDATE form fields.

Except, when I click the submit button on the UPDATE form, it carries out the server validation on the form fields and then wipes all the values from the form! :(

I was thinking that I was misunderstanding this and that the default value should be validated entries but that won't work because on initial load of the page no validation has been carried out?

Is this a bug?

Page attached.
Thank you
NJ

Sign in to reply to this post

Jason ByrnesWebAssist

in the server validation settings, set the fialied redirect to pass a URL variable:
myprofile.php?invalid=true


then in the initila value of the form elemnt, you can use isset() as a ternary expresion to use the validated entries if validation fails, or the recordset if not. For example, for the first name field:

<?php echo((isset($_GET["invalid"])?ValidatedField("myprofile_437","LEDUserFirstName"):"".$row_rsUSER['LEDUserFirstName']."")); ?>
Sign in to reply to this post

Nathon Jones Web Design

That's great, thank you. Again, without knowledge of this it would be impossible to fathom it from the behaviours themselves.

I've also created an INSERT form which, obviously, doesn't need the recordset values as it is a new entry. I ran into the same problem - upon submit of the form and running of the server validation all of the fields data would be wiped - so I set the default value for every field to be:
value="<?php echo(ValidatedField("addcustomer_648","LEDUserFirstName")) ?>" etc

Problem now is, when I click submit and server validation runs, it is abbreviating my password. On test I am entering the following as the intial password:
password!"£$

When server validation runs, it abbreviates my password entry to just:
password!

...I'm assuming that this might be to do with allowing " in the password, but can you clarify as, again, there's no way of knowing this stuff using the behaviours alone.

Thank you
NJ

Sign in to reply to this post

Jason ByrnesWebAssist

  Again, without knowledge of this it would be impossible to fathom it from the behaviours themselves.  



that is why the forum is here.

  I'm assuming that this might be to do with allowing " in the password  



yes, that is correct, quote characters should not be allowed in passwords.

Sign in to reply to this post

Nathon Jones Web Design

What other characters shouldn't be allowed? I'll obviously need to add a "Restrict Content" server validation for that.

Thank you.
NJ

Sign in to reply to this post

Nathon Jones Web Design

The Restrict Content server validation isn't allowing me to enter ". I guess that's why the forum is here. ;)
Also, when I enter anything in the Restrict Content server behaviour it isn't allowing me to edit the "Replace" section which just lists the same symbol/s as I'm trying to restrict which, in effect, renders the validation useless if it is just replacing with what you're trying to restrict.
Hope you can help.
Thank you
NJ

Sign in to reply to this post

Jason ByrnesWebAssist

quotes are the only ones that shouldn't be allowed as they are string termination characters.

Sign in to reply to this post

Nathon Jones Web Design

See my two replies above...thank you.

Sign in to reply to this post

Jason ByrnesWebAssist

Restrict content is not the proper validation type for this.

use the alpha numeric validation type instead.

in the allow other section, you can enter the special characters that should be allowed. omit the quote characters in the allow other list.

Sign in to reply to this post

Nathon Jones Web Design

Originally Said By: Jason Byrnes
  Restrict content is not the proper validation type for this.  


Perhaps a change of title is required?

I want to allow special characters, but only special characters that don't stop the whole thing working properly.
How should they be listed in the "Allow other" section? Comma separated?

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...