onchange client script in catalog form to clear the entered text
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2024 02:32 AM
Hi
I want to write a client script for clearing the entered text in variable of catalog item
Whenever we are selecting "others" then "please specify" field will be displayed and we are going to enter the required text.
If we are going to select different option rather than "others" and again selecting "Others" then the previous entered text remains same.
Can anyone helpme out to write a Onchange client script for clearing those entered text for the above scenario.
Regards,
Dhanush
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2024 03:30 AM - edited 08-12-2024 03:30 AM
Hi @Dhanush Rao K ,
You can write a UI Policy where you write a condition when to execute Team is Others and then under UI Policy Action you can control the visibility of Please Specify field, set Visible to true and then there you have the option of clear value as suggested by @Weird
Please mark helpful/correct if my response helped you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2024 04:35 AM
UI Policy is the best and no-code approach to your requirement. Define a UI Policy on the variable Team Changes and in the UI Policy action, ensure that you check Clear the Variable Value checkbox.
Thanks and Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.