I have date field in my webform. And when I try to use this value in custom php field is empty.
For example: [data:textfield-value] display correct value, [data:datefield-value] display nothing.

how can I use this in 'After a webform has been submitted' event

Comments

Snehal Brahmbhatt’s picture

If you have a look at your rule under Custom PHP Code "Replacement patterns for The submitted webform data" section, they mentioned [data:{component}-value] it means you have to replace {component} with your Field Key which you created at the time of webform generation.

You can check by editing the field of webform.

i.e.

Field Label : Joining Date
Field Key : joining_date

then, [data:{component}-value] field should be [data:joining_date-value]

Let me know incase of any query.

Thanks,
Snehal Brahmbhatt | AddWeb Solution
https://www.drupal.org/user/3147795/track

mrk23’s picture

Thanks for your reply.
It was set as you wrote, but my tokens [data:start_date-value], [data:end_date-value] return empty values. Only this date fields, text fields and other are correct.
I try with date as text field (I have start/end dates prepopulated from url) and date 2015-06-13 is displayed as subtraction
- 1996...