Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2025 03:50 AM
Hello,
try this onChange Client Script code, replace <duratiion field> with your field name:
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '')
return;
var duration = g_form.getIntValue('<duration field>');
if (duration > 8 * 60 * 60 ) {
g_form.showFieldMsg('<duration field>', getMessage('Maximum allowed duration is 8 hours'), 'error');
}
}Also you can reuse the code logic in your onSubmit Client Script.
If my answer helped you, please mark it as correct and helpful, thank you 👍
Martin