questionnaire 2

Show fields one by one

This example shows how you can use Conditional Fields for Contact Form 7 to create a form that will force the user to fill in fields in a particular order by only displaying the next field if the previous field is filled out. In this example all fields remain visible and editable after they are filled out. In some cases you might want a field to disappear after it is filled, and then display a new field. This can also be achieved with CF7CF. An example of this is questionnaire 1.

Form

Question 1: Hi, how are you?

Question 2: What is your favorite color?

Question 3: What is your least favorite color?

Question 4: Do you like my website?

Question 5: Do you like this plugin?

Question 6: Do you like random questions?

Question 7: How the hell are you supposed to answer this question?

Question 8: Wow! You made it pretty far already, seems like you really enjoy filling out this questionnaire, don't you?

Question 9: One more question after this one. Okay?

Question 10: Just answer yes or no and the submit button will appear!

 

Form Code

Question 1: Hi, how are you?
[select q1 "---" "I'm great" "I'm fine" "Not so well"]

[group g2]
Question 2: What is your favorite color?
[select q2 "---" "red" "blue" "yellow" "something else"]

[group g3]
Question 3: What is your least favorite color?
[select q3 "---" "red" "blue" "yellow" "something else"]

[group g4]
Question 4: Do you like my website?
[select q4 "---" "yes" "no"]

[group g5]
Question 5: Do you like this plugin?
[select q5 "---" "yes" "no"]

[group g6]
Question 6: Do you like random questions?
[select q6 "---" "yes" "no"]

[group g7]
Question 7: How the hell are you supposed to answer this question?
[select q7 "---" "yes" "no"]

[group g8]
Question 8: Wow! You made it pretty far already, seems like you really enjoy filling out this questionnaire, don't you?
[select q8 "---" "yes" "no"]

[group g9]
Question 9: One more question after this one. Okay?
[select q9 "---" "yes" "no"]

[group g10]
Question 10: Just answer yes or no and the submit button will appear!
[select q10 "---" "yes" "no"]

[group gsubmit]
[submit]<p>&nbsp;</p>
[/group][/group][/group][/group][/group][/group][/group][/group][/group][/group]

Email Code

q1: [q1]
q2: [q2]
q3: [q3]
q4: [q4]
q5: [q5]
q6: [q6]
q7: [q7]
q8: [q8]
q9: [q9]
q10: [q10]

Conditional Fields

show group if field operator value

g2 g3 g4 g5 g6 g7 g8 g9 g10 gsubmit