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'm using webform query tokens as the default value for some of my fields: [current-page:query:subject] to populate the field if the url is http://example.com?subject=test
Sometime the url query string will not be present: http://example.com in which case the default value for the field should default to empty; however, the token is beind displayed as the default value in the form.
Any solutions to solve this issue?
Thanks,
Comments
Comment #1
DanChadwick CreditAttribution: DanChadwick commentedSearch first please.
Comment #2
Gere CreditAttribution: Gere commentedI have the same problem. I use profile values for logged in users in forms. If user nog logged in or a stored value is empty the token shows in the form field instead of showing an empty field as some time before. (It must be caused by a change in the update of the token handling in the Webform module...
I've searched for a solution but not yet found...
Comment #3
DanChadwick CreditAttribution: DanChadwick commented#1667572: Webform as block [current-page] token uses Webform's path instead of current page
#2469205: Token name showing as default if token empty or undefined, [current-user:field]
#2468841: don't clear empty fields values (inserted token placeholder)
#2464875: Token default values show for anonymous users
#2463105: Webform Token user pb.
#2462977: Token in default value not replaced
#2461931: Hide field default value token
Comment #4
drummondf CreditAttribution: drummondf commentedI've searched for an answer to this issue but have not found one - can someone please post a link to the thread where this was solved?
To re-state my issue, my site uses URL queries. When they are absent the token is passed in the URL - I need to set a default and do not know how to do that. If there is an existing solution please show me.
Thank you