I'd like to have the option of pre-populating a field value by passing the value in the URL (which works) but I would also like the form to appear blank if the site user comes to the form via a URL without the variable. In this latter case the current version of webform displays the %get[variable] formula in the field, instead of a blank field. Is this expected behavior?

Any tips on how to get the field be empty/blank if the variable is undefined?

I'm using the current, stable versions of drupal and webform.

Comments

dquakenbush’s picture

Category: bug » support
Priority: Normal » Critical
dquakenbush’s picture

Anyone?

dquakenbush’s picture

Category: support » bug
dquakenbush’s picture

Category: bug » support
dquakenbush’s picture

Category: support » bug
Critical Tinkerer’s picture

I am doing this successfully using the SELECT component and and passing parameters on the URL using ...

Default value:

%get[level]

Options:

level1|Level One
level2|Level Two
level3|Level Three

Passing as a URL parameter preselects, as expected. In the case of no parameter being passed, the form component reverts to "select...", which is also correct behaviour.

However, I'm not using the same version as you (at some point I seems to have got myself on 6.x-3.x-dev 2009-Jul-09) so I can't say for sure what your problem might be.

Critical Tinkerer’s picture

Status: Active » Closed (fixed)

Closing this for non-activity