I am hoping to use the selected option of one Webform element ("Organization") as the argument in an Entity Select element ("Site") using Views handler.
organization: '#type': entity_select '#title': 'What is the name of your organization?' '#empty_option': 'Please select' '#target_type': node '#selection_handler': 'default:node' '#selection_settings': target_bundles: organizations: organizations site: '#type': entity_select '#title': Site '#target_type': node '#selection_handler': views '#selection_settings': view: view_name: sites display_name: entity_reference_1 arguments: - 'WHAT DO I PUT HERE TO REPRESENT ORGANIZATION?'
I wouldn’t expect this to happen with tokens, which become available after submission, but I was thinking this could potentially be done using "data", which is available to Webform Computed Twig elements. I tried adding '#ajax': true
to the Entity Select element and then putting {{ data.organization }}
as the argument, but that didn’t work.
Thank in advance for any tips!