close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

WA Volidated Entries not populating form fields on validation?

Thread began 10/14/2017 7:52 am by Nathon Jones Web Design | Last modified 10/17/2017 7:26 pm by Ray Borduin | 49 views | 8 replies |

Nathon Jones Web Design

WA Validated Entries not populating form fields on validation?

I have an insert form that uses WA Server Validations. When the form is submitted I want the values that the user has entered to remain in the fields so that the user doesn't have to complete the whole form all over again just because one field fails.

So I have the value of the form fields set to the WA Validated Entries values as follows:

value="<?php echo(ValidatedField("addnews_784","newsTITLE")) ?>"



However, when I submit the form all of the form fields are wiped and the user has to start all over again. :( I have $WAFV_Redirect set to the same page with a querystring added so that I can display an overall fail message:

$WAFV_Redirect = "add_news.php?anewsval=1&dID=".((isset($_POST["dID"]))?$_POST["dID"]:"")  ."";



...so I know that the validation is working.

I copied this code from another form, which works perfectly, so I'm at a complete loss as to why this isn't working. It's such a large form that I don't want to have to create it from scratch again.

Could you take a look at it and let me know what's going wrong? (attached)

Thank you.
NJ

Sign in to reply to this post

Ray BorduinWebAssist

The validated field result has to use the identifier from the server validation. You can find it on line 28... so the code should be:

php:
value="<?php echo(ValidatedField("WAVT_addnews_784_Errors","newsTITLE")) ?>"
Sign in to reply to this post

Nathon Jones Web Design

Have changed that Ray and there's no change. All of the fields are being wiped upon failure of the validation.

I've checked another form I have, an identical form in fact on another domain, and it uses:

value="<?php echo(ValidatedField("addnews_784","newsTITLE")) ?>"



...and it works fine.

I attach the page again, with the amendments I've made. I've changed all of the values to:

value="<?php echo(ValidatedField("WAVT_addnews_784_Errors","newsTITLE")) ?>"



I've also provided a link to this online, so you can check it in a live scenario.

Thank you.
NJ

Sign in to reply to this post

Ray BorduinWebAssist

Sorry I forgot you don't include the WAVT_ at the front. I think it should just be:

value="<?php echo(ValidatedField("addnews_784","newsTITLE")) ?>"

Sign in to reply to this post

Nathon Jones Web Design

Have changed it to:

value="<?php echo(ValidatedField("addnews_784_Errors","newsTITLE")) ?>"


...but it has made no difference.

Have also tried resetting it to:

value="<?php echo(ValidatedField("addnews_784","newsTITLE")) ?>"



No joy there either. Hope you can help. Thank you.
NJ

Sign in to reply to this post

Ray BorduinWebAssist

Yes, sorry for the run-around. It should be:

php:
value="<?php echo(ValidatedField("addnews_784","newsTITLE")) ?>"



Which is what you had originally I think.

Does it show the validation message below the field with errors properly? Maybe your server is having issues saving session variables in general?

Sign in to reply to this post

Nathon Jones Web Design

That's what I had originally, yes. It doesn't work.

It doesn't show the validation message below the field, no, but it is validating because it redirects to the same page but with the querystring appended as specified:

$WAFV_Redirect = "add_news.php?anewsval=1&dID=".((isset($_POST["dID"]))?$_POST["dID"]:"")  ."";



I have other pages on this same site that create and use session variables.
Got me well and truly stumped this.

NJ

Sign in to reply to this post

Ray BorduinWebAssist

If you give me ftp access I can look into it.

Maybe just try moving the wavt_scripts_php.php require_once statement lower so that it is right above the validation code.

Sign in to reply to this post

Nathon Jones Web Design

Moving the wavt_scripts_php.php require_once statement lower so that it is right above the validation code has fixed it, thank you Ray.

Much appreciated.
NJ

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

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