How to create a link from node view and pass information to a webform In Drupal 8, I have a webform field attached to a node with the Link to form formatter enabled. 

Can I add the ID of that node in the Link custom attributes (YAML) textarea to display a block view of some node fields?

My goal is to be able to use a contextual filter on the block view to display the node information like title and some other fields around the form
I don't think webform link field can be used to accomplish this as the purpose of Link custom attributes (YAML) is for HTML TAG attributes like 

target: _blank


You can use field_token_value to create a field on the node that has tokens as input. Install and enable the module and then add a token field.



The value of this field would be an HTML link with query parameters added (nodetitle in this example) you can browser for all available tokens under field value.



Then on the webform side you have to enable query parameter to populate fields by going to the settings of the webform &gt; form &gt; form behaviours &gt; prepopulate &gt; Allow all elements to be populated using query string parameters.



And then on the field to display the query parameter include the appropriate token.  Here adding the nodetitle to the subject field default value.



For token field to be populated a node needs to be saved.