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

Conditional Validation: Both cannot be blank

Thread began 3/03/2010 2:25 pm by yogastudents362523 | Last modified 3/03/2010 4:52 pm by yogastudents362523 | 738 views | 2 replies


Originally Said By: yogastudents362523
  I want Validation Toolkit to insist that I receive either a cell phone number or a land number from my form. One of ['cellphone'] OR ['contactphone'] is required, but both can be provided if desired.

Suppose my error message is "NO". What coding must surround "NO" so Validation Toolkit does what I want and shows "NO" if both phone number fields on my form are left blank?

Please keep this very very simple! I am learning fast ... but I am obviously still a newbie. I've tried experimenting with:
!isset($_POST['contactphone']?!$_POST['cellphone']:"NO" but it's not working out. Either I have that wrong, or I am inserting it in the wrong place.



OK. I think I solved my own problem.
I will create a third, hidden field.
I will then arrange for it to be filled, conditinally, with either one or the other of my two phone fields.

I will then validate that third field. It will be required, and may not be blank. I believe that will work.

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