View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Checkout Page Form Field Validation

Thread began 12/10/2009 6:34 pm by Kevin373660 | Last modified 12/16/2009 8:43 pm by Kevin373660 | 1473 views | 7 replies

Kevin373660

Setting the session for each form input on the confirm.php page and binding these to the form fields on the checkout page works great! Except for the dynamic menu/list for the State and Country selections.

Tip for others in forum: When Binding a menu/list to a session value use the Design view, place curser on the leftside of the form field and use the Tab key to select the form box. Then select the appropriate binding element from Application-Bindings and click on the Insert button at the bottom of the Bindings window. The session value will instert a "title=" echo <session>"" entry into the form code.

If returned back to the confirm page, when a State is selceted the validation error message hides and when you hover over the field the value displays. The session is set to hold the "value" not the label (ex. label=New York, value=NY). The value is required next to process the courier and payment functions. So in a sense the valiation is working correctly. However, the user sees a blank label with the state name in the from field. I think that I ran into this before and look at my other code but in that case I was using both server and client validation. What can I do so that the customer does not need reselect?


***********************************
<tr>
<th><label for="state_province" >State</label></th>
<td><select name="state_province" id="state_province" style="width:200px;" tabindex="7" title="<?php echo $_SESSION['eCartCheckoutForm_state_province']; ?>">
<option value="<?php echo $_SESSION['eCartCheckoutForm_state_province']; ?>" <?php
if (ValidatedField('checkout','checkout')) {
if ((strpos((",".ValidatedField("checkout","checkout").","), "," . "7" . ",") !== false || "7" == "")) {
if (!(false)) {
?>
class="fail"
<?php //WAFV_Conditional checkout.php checkout(7:)
}
}
}?>></option>
<?php
do {
?>
<option value="<?php echo $row_BillState['state_Abrv']?>"><?php echo $row_BillState['statePrintable']?></option>
<?php
} while ($row_BillState = mysql_fetch_assoc($BillState));
$rows = mysql_num_rows($BillState);
if($rows > 0) {
mysql_data_seek($BillState, 0);
$row_BillState = mysql_fetch_assoc($BillState);
}
?>
</select></td>
<td class="CkOutValidationErrors"><?php
if (ValidatedField('checkout','checkout')) {
if ((strpos((",".ValidatedField("checkout","checkout").","), "," . "7" . ",") !== false || "7" == "")) {
if (!(false)) {
?>
* Please select state.
<?php //WAFV_Conditional checkout.php checkout(7:)
}
}
}?></td>
</tr>

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