4

I need to make a form that autofills itself with some values that I give from the GET or POST params

I have an emailing that is personalized for each user so when they click on a link or a submit form they will view that webform autorefilled with their data

I'm using Drupal 6.19 and Webform 6.x-3.4

  • Please mention your Webform and Drupal version. – marcvangend Oct 25 '11 at 11:53
10

Webform has GET support built-in, see: Setting Default Values from the URL.

For POST you have access to %post[key] or you can retrieve $_POST and set your values using hook_form_alter().

Webform allows several special values to be used as defaults when configuring a component. The special placeholders are commonly called tokens. The tokens Webform supports include:
%username
%useremail %site
%date
%server[key]
%session[key]
%get[key]
%post[key]
%request[key]
%profile[key]

Working with Default Values

1

The prepopulate module does it for GET arguments.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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