When defining a new Contact form using the 'email' field and setting its 'default value' as '[current-user:mail]' the JavaScript validation prevents the form from being submitted due to the '@' character missing from the value.

CommentFileSizeAuthor
Screen Shot 2016-05-17 at 15.08.18.png32.41 KBbudda

Comments

budda created an issue. See original summary.

webcultist’s picture

Experienced the same problem with the field default token module.

feelcreative’s picture

Ditto, experiencing the issue now, anyone find a solution?

C

ptmkenny’s picture

Version: 8.1.1 » 8.5.x-dev

This is still an issue with the latest dev version. I just ran into this problem today.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

drupgirl’s picture

Ran into this issue on 8.5.2 today. Anyone solve it?

msankhala’s picture

Status: Active » Closed (duplicate)
Related issues: +#1070878: Allow tokens to be used in the default value of a field

This is not only true for email field. This applies to all fields of the specific type e.g., integer, float, timestamp, link etc. Drupal's new FAPI uses HTML5 field types where ever possible which do not allow token values in field value/ field default value. See #1070878: Allow tokens to be used in the default value of a field