By prezaeis on
i need to create a form where by the selection of one field will alter what is show below, or example
1. Are you a business or an individual
if the user selects business then the question below it would be
2. What kind of business
however if they choose individual then that secound question wont be relevant so it wont show
i need to collect information like this on a form, prefebly on user registration and then save it to the users profile, whats the best way to do this? can someone advise me
many thanks
Comments
What about the module
What about the module Webform
That might work for you. I believe it is the most full featured form project on Drupal.org
- Craig Vanderlinden @cvanderlinden
yes i looked at webform bu i
yes i looked at webform bu i need the information to be collected at registration and stored in the user profile and as far as i know webform doesnt have that feature.
Webform and jQuery can do that.
You can do that....
I added this js to a block at the top of the page that contains my webform. In my form, the radio button "are you a client?" toggles the select box for "which company?". Note: Because the second question is hidden, it cannot be required(*) on your form.
For the second part of your problem, use the webforms "advanced processing (php)" field to take the submitted data from the webform and create/update the user's profile field(s).
You could use a content type,
You could use a content type, the content profile module and the Conditional Fields module.