If I set default value for name field as [current-user:name], this field filled with "Anonymous" for anonymous users. I want name field left blank for anonymous users. How can I do this?
Thanks

Comments

DanChadwick’s picture

Category: Feature request » Support request
Status: Active » Fixed

This is a token supplied by Drupal core. You can edit what user 0 is called using the Drupal configuration settings, if that helps. For example, "Visitor" might be better for you.

Or you could write your own token for this using a small custom module.

Or you could put the uid into a hidden webform component and then set a conditional IF uid = 0 then SET name to (empty). This would, however, prevent the user from filling this in, rather than just defaulting it.

Good luck.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.