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

Validation conditionals possible?

Thread began 4/28/2009 3:19 pm by eric341232 | Last modified 10/29/2014 12:08 pm by eric341232 | 4198 views | 11 replies


Came back to this post cause now im trying to do something similiar i have a check box field and some text field i only want them to be required if the checkbox is selected, i did the above explained by Ray Borduin, but it always ask me to check the checkbox in order to continue, im using server side validation wich is the one i prefer cause it cant be shut down.

if (isset($_POST["KT_Custom1"]))  {
$WAFV_Redirect "";
$_SESSION['WAVT_depositar_716_Errors'] = "";
  if (
$WAFV_Redirect == "")  {
$WAFV_Redirect $_SERVER["PHP_SELF"];
$WAFV_Errors "";
$WAFV_Errors .= WAValidateRQ(((isset($_POST["Tipo_de_operacion"]))?$_POST["Banco_seleccionado"]:"") . "",false,2);

  if (
$WAFV_Errors != "")  {

form elemnts:

<label for="Tipo_de_operacion">Already made deposit:
<input type="checkbox" name="Tipo_de_operacion" id="Tipo_de_operacion" value="1" />

<label for="Banco_seleccionado">Type your deposit number:
<input type="text" name="Banco_seleccionado" id="Banco_seleccionado" value="" size="32" /></label>

And the show if

if (ValidatedField('depositar_716','depositar_716'))  {
  if ((
strpos((",".ValidatedField("depositar_716","depositar_716").","), "," "2" ",") !== false || "2" == ""))  {
    if (!(
false))  {
            Requiered field
  <?php //WAFV_Conditional depositar.php depositar_716(2:)


this checkbox internally is called "Tipo_de_operacion" the label out side is diffrent i want the user that if he is going to pay with a bank deposit he has to fill in a textfield with the deposit number, if he doesnt select the check box it should continue to insert the form to save the order for later payment.

I had no luck with the above technic to tell on server side validation that only if the checkbox is selected, what am i doing wrong here cause if i select the checkbox and fill the text field it works but thats not the point or goal to make this work,

Can we get a better example on how is it done with server side includes?


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