Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
dquakenbush CreditAttribution: dquakenbush commentedComment #2
dquakenbush CreditAttribution: dquakenbush commentedAnyone?
Comment #3
dquakenbush CreditAttribution: dquakenbush commentedComment #4
dquakenbush CreditAttribution: dquakenbush commentedComment #5
dquakenbush CreditAttribution: dquakenbush commentedComment #6
Critical Tinkerer CreditAttribution: Critical Tinkerer commentedI am doing this successfully using the SELECT component and and passing parameters on the URL using ...
Default value:
%get[level]
Options:
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.
Comment #7
Critical Tinkerer CreditAttribution: Critical Tinkerer commentedClosing this for non-activity