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

rating

Validation show if on a recordset question

Thread began 5/14/2012 5:34 pm by lr_leal239405 | Last modified 5/16/2012 3:59 pm by Jason Byrnes | 614 views | 5 replies |

lr_leal239405

Validation show if on a recordset question

I have an add to cart function that selects from a database and a 'number of persons' number that must be selected from a dropdown. If the visitor does not select a number from the dropdown the validation show if function statement 'you must select a number' comes up. However, I can't get it to show up on the selected row only....it shows up on all the rows. I inquired from a PHP developer but he said he would need to know how Webassist plugin works. Can I get some direction on this?

Sign in to reply to this post

Jason ByrnesWebAssist

I'm not sure i understand what you are trying to accomplish. please provide more details on what you are trying to do so I can get a better grasp of how to direct you.

Sign in to reply to this post

lr_leal239405

I'm not a professional programmer and just know some very basic PHP so I tried to get a PHP programmer enlisted but said he'd have to figure out webassist in order to fix.

When you don't select a number, it shows the validation message on all. I need to show only on the selected row: sign_up/

Just wanted some direction. I'll look for another programmer if programmer should be able to figure it out without delving into Webassist.

thanks.

Sign in to reply to this post

Jason ByrnesWebAssist

ahhhh, ok, I get it now.

the problem is that each form uses the same element name.

you can get around it by setting the failed redirect to pass the value of the eCart1_1_ID_Add form element as a querysting variable, then add an additional if statement around the validation show if code to only show if the ID in the query string is equal to the ID in the recordset.


send a copy of your page and i can tell you the code changes to make.

Sign in to reply to this post

lr_leal239405

<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$WAFV_Redirect = "";
$_SESSION['WAVT_index_966_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateRQ(((isset($_POST["time"]))?$_POST["time"]:"") . "",false,2);

if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"index_966");
}
}
?>

<?php
if (ValidatedField('index_966','index_966')) {
if ((strpos((",".ValidatedField("index_966","index_966").","), "," . "2" . ",") !== false || "2" == "")) {
if (!(false)) {
?>
*You must select a time
<?php //WAFV_Conditional index.php index_966(2:)
}
}
}?>

Sign in to reply to this post

Jason ByrnesWebAssist

I need the entire page code, more than just this piece of code needs to be changed.


I have created a support ticket so we can look into this issue further.

To view and edit your support ticket, please log into your support history:
supporthistory.php

If anyone else is experiencing this same issue, please append to this thread.

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