Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
i have a situation where in when a user selects no for a variable the form should not be submitted in catalog form, how can we achieve this?
Solved! Go to Solution.
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
@Abdul ,
Create an onsubmit client script by modifying below code to prevent form submission.
function onSubmit() {
var answer = g_form.getValue('your_variable_name'); // replace with actual variable name
if (answer == 'no') { // value should match the variable's internal value, not label
alert("You cannot submit this form if 'No' is selected. Please change your response.");
return false; // stop submission
}
return true; // allow submission
}
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
@Abdul ,
Create an onsubmit client script by modifying below code to prevent form submission.
function onSubmit() {
var answer = g_form.getValue('your_variable_name'); // replace with actual variable name
if (answer == 'no') { // value should match the variable's internal value, not label
alert("You cannot submit this form if 'No' is selected. Please change your response.");
return false; // stop submission
}
return true; // allow submission
}