close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Conditional Validation

Thread began 11/03/2011 8:56 am by vernon webb | Last modified 10/23/2014 9:13 am by Jason Byrnes | 3403 views | 11 replies |

vernon webb

Conditional Validation

First let me say that the help files drive me nuts, no matter what I do I cannot get Flash to allow them to display in any of my browsers. In any event I have two drop down list. The first is not a required field, however, if someone selects something in that field I want to require that the second one be choosen. I figured that is what a Conditional Validation does, however when I chose that option all it reall does is allow me to select the first list and the second, but says nothing about what it does and since the help files don't work I cannot figure it out. Anyone know if this is what I supposed to do? If not, any clue how I can acheive this? Thanks.

Vern

Sign in to reply to this post

Jason ByrnesWebAssist

We have the help documentation online as well, there is a link to the online help for each of the products on the support landing page, for validation toolkit go here:
validation-toolkit/


and click the online help link.

here is a sample file i created using conditional validation that should help.

Attached Files
conditionalSample.php.zip
Sign in to reply to this post

vernon webb

This doesn't work for me and the link you provided doesn't show me how to do conditional validation. The sample file of course works as is but I can't seem to make it work for me. What is different, and I'm not sure if this matters, is that my second field is not a text field, but rather another select. Does that make a difference?

Sign in to reply to this post

Jason ByrnesWebAssist

send a link to your page so I can see what you have done.

Sign in to reply to this post

vernon webb

user_times_Insert_temp.php

The one I am working on is "Number of Appointments Set" and "Appointment Type" if the Number of Appointments Set is something other than 0 I want to force the user to select an Appointment Type.

Sign in to reply to this post

Jason ByrnesWebAssist

set the 0 option to have a blank value:
<select name="APPTS" id="APPTS">
<option value="" selected="selected">0</option>
<option value="1">1</option>
</select>

Sign in to reply to this post

vernon webb

Sorry for the delay in responding. The problem with this code is it forces the user to slect Appointment Type no matter what. What I am looking for is if the user selects 0 "Number of Appointment Sets" then they must select "Appointment Type" other than the first option (N/A). Please note that I moved this to a new file.

user_times_Insert_temp.php

Sign in to reply to this post

Jason ByrnesWebAssist

the initial value for the APPTS list need to be blank, you have it set to 0
change:
<select name="APPTS" id="APPTS">
<option value="0" selected="selected">0</option>
<option value="1">1</option>
</select>


to:
<select name="APPTS" id="APPTS">
<option value="" selected="selected">0</option>
<option value="1">1</option>
</select>

Sign in to reply to this post

vernon webb

Yes I know that, I did make the change, however I am still getting a message that tells me I have an error unless I actually do select an appointment type. I want to allow them to be able to select 0 APPTs, as it is now you cannot.

Sign in to reply to this post

Jason ByrnesWebAssist

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
loading

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