I m trying to build a form that has questions with radio button answers when someone clicks on a radio button the next question comes up and it should have a next and prev button is there any php code i need to put in? or will it be just jquery as i m very new to php and javascript

3 Answers 3


You may use Webform module and read this.

The full documentation is at http://drupal.org/documentation/modules/webform.

You can achieve the conditional field with Webform Conditional.

This modules enhances the existing Conditional Rules of the Webform Module. It adds the ability to make components dependent on select components(i.e. listboxes, radio buttons, and checkboxes) that appear on the same page.

Here's a youtube video Screencast demo.

Webform already has support for conditional fields on multi-page forms. For example Field C on Page 2 can be dependent on Field A on Page 1. This module adds the ability to have conditional fields on the same page. This module adds the ability to have Field B on page 1 be dependent on Field A also on Page 1.

Check the version of the Webform module; you may have it already.

  • i have done that but what i want is when someone clicks on a radio button the next question slide out instead of clicking next page button. Apr 17, 2013 at 8:49

You can have a look at https://drupal.org/project/webform_ajax_page it renders all pages at once and uses AJAX to go to the next page, you might be able to add a sliding effect by hooking into the javascript


The conditional field module will let you set conditions for a field to appear or not.

For example if the question is do you have a cat? Then fields like:

Siamese Stray Kitten

And if you click on the radio button dog:

German Shepperd Bulldog Pitbll


http://drupal.org/node/1704126 does this

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.