default text in Description field
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2024 09:20 PM
Hi Team
when ever user selects ' Request category is ' remove ser access '. below text has to populate in description field .
How to achieve this in onchange cilent script .
NOTE - Description field where calling from Variable set .
Text :-
Exmaple text is required .
Please priovde sciript .
15 REPLIES 15
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2024 10:36 PM
Did you try this
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
// Check if the 'Request Category' variable has changed to 'remove_user_access'
if (newValue == 'remove_user_access') {
// Get a reference to the 'Description' field
var descriptionField = g_form.getControl('description');
// Set the desired text in the 'Description' field
descriptionField.value = 'Example text is required.';
} else {
// For other options, reset the 'Description' field to its default value
var descriptionField = g_form.getControl('description');
descriptionField.value = '';
}
}