Form Questions with Yes/No Responses

Jacob Phillips asked on November 17, 2015 17:39

I am currently running on Kentico version 7.0.57. I understand that this is an older version, but it is the most stable version, and we are a non profit organization that cannot always afford updates.

We have been running Kentico CMS since version 5.

I have used the Forms feature in the past, but my current request has some more advanced needs.

I am currently configuring a Form that will have 20 Yes/No questions.

The user must complete all questions with a Yes or No Check Box response. The majority of the questions will be answered with a Yes response; however, some will require a No response.

Once the user completes the questions he/she will click a Submit button, and based on the responses given the user should be taken to another URL based on the responses.

What is the best practice for setting up the Yes/No questions that will determine what URL the user will visit after clicking the Submit button?

Recent Answers


Joshua Adams answered on November 17, 2015 17:55

Would it make sense for you to build it all into the one form? There is a concept in Kentico called depending fields, which basically allows you to set up a form and to check the values of fields, and show/hide other fields based on a condition. There is more about it in the link below. Seems like this would be the simplest approach, otherwise, there are ways to make the other "wizard" forms work as well, but if your budget isn't large, this may be a simpler and easier approach.

https://devnet.kentico.com/articles/using-dependency-fields-in-forms

0 votesVote for this answer Mark as a Correct answer

Jacob Phillips answered on November 17, 2015 18:10

Thank you for your quick response Joshua, and yes I would like to build it all into the one form if that is possible. However, I am willing to entertain any option at this point.

My budget is non-existent because our state has not passed their budget, and we are dependent on their funding.

With the option you have provided I would assume that I should make the Submit button dependent on the responses?

If that is the case is there anyway to change the error response that is given to a user when fields do not meet their requirements? Currently the default text that is displayed is: "The entered values cannot be saved. Please see the fields below for details. "

I would like to change this text to: "You are ineligible to proceed. Please see the fields below for details."

Thank you again. Jake

0 votesVote for this answer Mark as a Correct answer

Joshua Adams answered on November 17, 2015 21:13

It depends, you could do that or you could just not allow the form to be submitted by using validation rules. The error message can be changed, either through code or through the resx file.

https://devnet.kentico.com/forums/f60/t32354/how-to-remove-biz-form-validation-message

Another option that you could look into would be a document wizard or something along those lines. I think event Kentico has a multi step form, that uses alternate forms to accomplish things such as this. Try to give that a look and see if that is an option for you all.

https://devnet.kentico.com/marketplace/web-parts/multi-steps-on-line-forms

0 votesVote for this answer Mark as a Correct answer

Jacob Phillips answered on November 18, 2015 20:10

Thank you for your response Joshua.

I am currently utilizing validation rules to prevent a user from progressing through the form. So I believe that problem is solved.

I will use your suggestion concerning the biz-form validation.

I do have one last request. I have a question setup in the following format with a dependency:

"Do you own a car?" Yes or No

If the user selects an option then the Visible dependency shows the next question:

"Is the car red? Yes or No

The first question has no validation; however, I need it to have some type of validation so that the second question is NOT visible if the user selects the correct option.

If this is possible would I still be able to use a validation rule on the second question if it is not visible?

Thank you.

0 votesVote for this answer Mark as a Correct answer

Joshua Adams answered on November 18, 2015 21:33

I believe that the validation rule will only take place if the field is visible. Try it out, it should work that way.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.