views:

16

answers:

2

Hi I have a question form and in that form i have 10 sections and in those sections i have 8 dropdown entries so for section one i have q1a, q1b, q1c etc

I want the user to only answer 5 of the 8 questions within a section and I want them to select them from 1-5 without duplicating the answer.

Is this at all possible?

A: 

Take a look at JQuery validation plugins such as this one:

http://bassistance.de/jquery-plugins/jquery-plugin-validation/

It will take considerable work to manually define the rules and logic, but it is definitely possible.

You would need a rule requiring 5 questions are answered. It may be helpful to create a logical group of input fields and then test which are blank.

You also need a rule to make sure that the values selected are not duplicated across select boxes.

js1568
A: 

In addition to what js1568 mentioned take a look at RSV.

It has javascript/php counterparts. The best part is that your rules are defined in javascript and php identically so it is easy to do server/client side validation with one set of rules just using two different languages.

That is if you are using php server side.

Chris