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


populate form with values, what do i use???

Thread began 6/08/2011 6:17 am by Base5 Designs | Last modified 6/09/2011 9:53 am by Jason Byrnes | 1141 views | 3 replies |

Base5 Designs

populate form with values, what do i use???

hi i have a update form on a page

the form has spry validation and one field has spry and a server validation to check the record is unique.

if i set the default value of the form field to the value from the recordset filtered by the id the correct value shows initially, but if the server validation fails, all the form fields are empty.

so i change the default values to use the values from WAValidatedEntries collection
now when the form initally loads they are empty.

my question is this:
how do i poulate the form with the initial values currently stored in the db when the form is first loaded and then if the validation fails populate the form with the validated entries.

i hope you understand the problem and can gibe me the answer, am sure its something very simple, but the documentation is so basic with very little detaild explanation of anything, and there are so many diffirent collections in the bindings, its not really clear what i should be using.

Sign in to reply to this post

Jason ByrnesWebAssist

this takes a little bit of hand coding to accomplish.

first, make sure that the server validations server behaivor is set to pass a querystring variable on failure:

we can use the valid query string variable to tell the form whether to use the validated entries collection or the recordset collection.

you recordset binding code will look similar to this:

<?php echo $row_recordsetName['firstname']; ?>

the validated entries binding code will look similar to:

<?php echo(ValidatedField("confirm","firstname")) ?>

we can put these together using a ternary expression like this:

<?php echo((isset($_GET['valid']))?(ValidatedField("confirm","firstname")):$row_recordsetName['firstname']); ?>
Sign in to reply to this post

Base5 Designs

Thanks working perfectly, am starting too really get the hang of things, takes a while to learn but am enjoying using much more than the old interact/addt stuff.

one thing i would like to suguest is in your documentation, if the various collections in the bindings were explained in more detail not just in general but for each item in the collection, what it contains etc.

the documentation contains good guides, but is a walkthrough once you stray off that path, its very difficult to know what each of the various items needed to fill in are for, as there is very little expalnation too the possible values that could be inserted.

maybe there is something that contains this information already but i have not found it on your site.

thanks again for your time and support.

Sign in to reply to this post

Jason ByrnesWebAssist

any documentation requests should be sent to the documentation team using the feedback form:

Sign in to reply to this post

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





Ease of use


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