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
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> </p>
[/group][/group][/group][/group][/group][/group][/group][/group][/group][/group]
Email Body
q1: [q1]
q2: [q2]
q3: [q3]
q4: [q4]
q5: [q5]
q6: [q6]
q7: [q7]
q8: [q8]
q9: [q9]
q10: [q10]
Conditional Fields (Text)
show [g2] if [q1] not equals "---"
show [g3] if [q2] not equals "---"
show [g4] if [q3] not equals "---"
show [g5] if [q4] not equals "---"
show [g6] if [q5] not equals "---"
show [g7] if [q6] not equals "---"
show [g8] if [q7] not equals "---"
show [g9] if [q8] not equals "---"
show [g10] if [q9] not equals "---"
show [gsubmit] if [q10] not equals "---"