0

I want to use a webform to do a feedback form but want it to act on data provided by the user. That is, if the user has answered a question about location which is stored in a session, then I want to show a webform field, otherwise don't show the field at all. Any ideas on if this is possible and how to do it in webform?

Thanks.

1
  • Try assigning a template for your form, so that you can work on that tpl.
    – niksmac
    Apr 18, 2012 at 13:55

1 Answer 1

1

try somewhere in your webform-form-[NID].tpl.php

hide($form['submitted']['your-field-name']);
if($_SESSION['your_value'] == 'what it should be') {
   show($form['submitted']['your-field-name']);
}
0

Your Answer

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

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