One field or the other is required
How do you handle the case where one of two fields is required - either or?
How do you handle the case where one of two fields is required - either or?
in the server validation behavior, click the lightning bolt icon next to server variable and select the first form field
the code entered for that selection will look like this:
<?php echo((isset($_POST["field1"]))?$_POST["field1"]:"") ?>
modify that to concatenate the second form element:
<?php echo(((isset($_POST["field1"]))?$_POST["field1"]:"")."".((isset($_POST["field2"]))?$_POST["field2"]:"")) ?>
this will mean the value being validated is the two elements combined.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
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.