- Issue created by @sdsc
- πΊπΈUnited States jrockowitz Brooklyn, NY
Use the :clear token suffix
[webform_submission:source-entity:node_field_name:clear]
- Status changed to Closed: works as designed
7 months ago 11:01pm 4 April 2024
I have a webform attached to node content, used to update this content and other actions.
The webform has a few fields of "text format". The default value of these fields are from the parent content:
[webform_submission:source-entity:node_field_name]
If the node_field_name has a value, it retrieves the data successfully. But if the node_field_name is null, the webform field will just display "[webform_submission:source-entity:node_field_name]". This is not good because if I don't make changes to this field, then "[webform_submission:source-entity:node_field_name]" will be passed onto the node content as real value when the webform is submitted.
Is there a way not to display any thing if the retrieved value is null?
I tried to use JS, no luck.
Please advise. Thank you in advance!
Closed: works as designed
6.2
Code
Use the :clear token suffix
[webform_submission:source-entity:node_field_name:clear]