close ad
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

How to set the value of a field to the database content and then the validated entry?

Thread began 1/26/2016 8:42 am by Nathon Jones Web Design | Last modified 6/06/2016 10:36 am by Nathon Jones Web Design | 2844 views | 24 replies

Nathon Jones Web Design

Thank you Ray.

I've corrected that (stoopid) mistake however certain fields are still misbehaving.

1) The "Full Text" HTML editor form field deletes the value despite this:

<textarea class="form-control" id="newsSUMMARY" name="newsSUMMARY" rows="3" placeholder="Describe the news article in one paragraph..." tabindex="4" required><?php echo(isset($_GET['enewsval'])?ValidatedField("editnews_784","newsSUMMARY"):$rsEDITNEWS->getColumnVal("DGCRCnewsSUMMARY")); ?></textarea>

2) When the UPDATE form initially loads, it displays the images (in the Photographs) section. I have un-hidden a usually hidden text field for storing of the default image file reference and it is displaying the correct file name. However, upon a validation fail the images disappear and the hidden img field reference is blank.

<fieldset class="form-group">
<?php if ($rsEDITNEWS->getColumnVal("DGCRCnewsIMG1") <> "") { ?>
<img src="images-news/<?php echo($rsEDITNEWS->getColumnVal("DGCRCnewsIMG1")); ?>" class="img-fluid img-thumbnail">
<?php } ?>
<label for="newsIMG1">Main Photograph</label>
<input type="file" class="form-control-file" id="newsIMG1" name="newsIMG1" tabindex="6">
<input type="text" id="newsIMG1hide" name="newsIMG1hide" value="<?php echo(isset($_GET['enewsval'])?ValidatedField("editnews_784","newsIMG1"):$rsEDITNEWS->getColumnVal("DGCRCnewsIMG1")); ?>">

3) The same thing is happening with the Document section.

4) Also, if a validation fails a validation error message should appear however when you go back to the seach form and select the news item again, despite it being a new request for hte page the previous validation error is displayed.

Another thing...

I have spotted a problem with the validation when used in conjunction with an INSERT form and the Save ID in Session As feature.
If you add a news item, using the system I've linked to above, and your form has no problems and doesn't fail validation then the Save ID in Session As feature works and, on the confirm page I have set up, you are shown the correct, newly added, article because it is pulling the correct row ID from the database using the ID saved in Session.

However, if you fail validation, make corrections and re-submit the form then it appears that the Save ID in Session As no longer works and you are presented with the first record in the table.

How do I resolve that?

Hope you can help with the above.
Thank you.

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