- Issue created by @kwfinken
- ๐บ๐ธUnited States jrockowitz Brooklyn, NY
Did you try to remove the 'and' and use...
visible: - - ':input[name="assistant_dean_email"]': value: '[current-user:mail]' - or - ':input[name="area_of_access"]': value: some_area ':input[name="current_logged_in_user"]': value: some_user
- ๐บ๐ธUnited States kwfinken Lansing, MI
Thank you for the prompt response:
I have tried these variations, they save and edit without problem, but do not function properly.
<pre> visible: - ':input[name="assistant_dean_email"]': value: '[current-user:mail]' - or - ':input[name="area_of_access"]': value: some_access ':input[name="current_logged_in_user"]': value: some_user </pre>
and
For others facing the same problem, I did get things working properly by using a hidden computed twig field and then referencing that as the condition. So my problem is solved, but the fact that this is not working is not solved.<pre> visible: - ':input[name="assistant_dean_email"]': value: '[current-user:mail]' - or - - ':input[name="area_of_access"]': value: some_access - ':input[name="current_logged_in_user"]': value: some_user </pre>
The way that worked is:
<pre> ad_for_dsl_access: '#type': computed_twig '#title': 'AD for DSL Access' '#attributes': class: - d-none '#mode': text '#template': |- {% if webform_token('[current-user:account-name]', webform_submission, [], options) == 'some_user' and data.area_of_access == 'some_access' %}TRUE{% endif %} '#whitespace': spaceless '#store': true '#ajax': true assistant_dean_approval: '#type': fieldset '#title': 'Assistant Dean Approval' '#states': visible: - ':input[name="assistant_dean_email"]': value: '[current-user:mail]' - or - ':input[name="ad_for_dsl_access"]': value: 'TRUE' </pre>
- ๐ฎ๐ณIndia abhishek_virasat
abhishek_gupta1 โ made their first commit to this issueโs fork.
- last update
11 months ago PHPLint Failed - Status changed to Needs review
11 months ago 6:21am 27 December 2023 - ๐ฎ๐ณIndia abhishek_virasat
@kwfinken, I've incorporated updates addressing your concern. Please review the attached patch file for the modifications.
- Status changed to Needs work
11 months ago 12:16pm 27 December 2023