close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Retaining input data on failed submit

Thread began 11/10/2014 11:58 am by Jamie | Last modified 11/18/2014 12:16 pm by Jason Byrnes | 2500 views | 9 replies |

Jamie

Retaining input data on failed submit

hey Jason

Is there a resource on the site that explains how to make a form retain data from inputs that are correct whilst the form submission itself fails stopping g the user from having to re-input data?

Cheers

Jamie

Sign in to reply to this post

Jason ByrnesWebAssist

you're using server validation, right?

if so, you set the initial value for the form elements to use the validated Entries binding group.

After you add server validation to a page, look in the bindings panel, there is a validated entries biding group with a binding for each form element in the form.

the validated entries binding is populated when validation fails with the values that passed validation.

bind each form element's initial value to the corresponding validated entries biding to retain values that passed validation.

Sign in to reply to this post

Jamie

Hey Jason

Its just on insert / update page sin the backend....do I need to add server validations to these pages or is it a different way to do this on a page such as the attached?

Thanks

Jamie

Sign in to reply to this post

Jason ByrnesWebAssist

I don't follow, how is the form submission failing if not using validation?

Sign in to reply to this post

Jamie

I think I may have been confusing myself with using thr update page as that doesnt have the validations on it... the insert does and can see how it works

Sign in to reply to this post

Jason ByrnesWebAssist

ok.

Sign in to reply to this post

Jamie

Hey Jason

Am struggling to get a dropdown menu to retain the info.

Have got an insert form which requires an image to proceed. On ffailed submit, I have got the text inputs working fine and retaining the entered data:

<input id="BikeColour" name="BikeColour" type="text" value="<?php echo(ValidatedField("bikeinsert_973","BikeColour")) ?>" class="formTextfield_Medium" tabindex="2" style="width:310px; height:35px; font-size:16px;" />



however, the dropdown menu I have tried

<select class="formMenufield_Medium" name="BikeStyle" id="BikeStyle" tabindex="5" title="Please enter a value." style="width:315px; height:35px; font-size:16px;">
<option value="Motorcycle" <?php echo(ValidatedField("bikeinsert_973","BikeStyle")) ?>>Motorcycle</option>
<option value="Moped" <?php echo(ValidatedField("bikeinsert_973","BikeStyle")) ?>>Moped</option>
</select>


and

<select class="formMenufield_Medium" name="BikeGears" id="BikeGears" rel="<?php echo((isset($_GET["invalid"])?ValidatedField("bikeinsert_973","BikeGears"):"")); ?>" tabindex="4" title="Please enter a value."  style="width:310px; height:35px; font-size:16px;">
<option value="Gears" selected>Gears</option>
<option value="Twist">Twist & Go</option>
<option value="Either">Either</option>
</select>


but clearly neither of these are working to retain the selection when the image option fails.

Thanks

Jamie

Sign in to reply to this post

Jason ByrnesWebAssist

for select lists, highlight the select list in design view, then open the property inspector.

in the property inspector, click the Dynamic button

Next to the Select Value Equal to option, click the lightning bolt and select the corresponding validated entries binding.

Sign in to reply to this post

Jamie

gotcha many thanks

Jamie

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome

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