- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2023 01:02 AM - edited 09-24-2023 11:13 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2023 01:30 AM
Try with Onsubmit catalog client script.
function onSubmit() {
if(!g_form.getValue("var1_name") && !g_form.getValue("var2_name") && !g_form.getValue("var3_name")){
alert("Fill atleast one field from the below fields\n Variable 1\nVariable 2\nVariable\3");
return false;
}else{
return true;
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2023 01:09 AM
Hi @Deepika Ravindr ,
You can achieve this by creating 4 client script,
1st client script to make onload and add script to make all 3 fields mandatory.
In next 3 onchange client script in each of the script, just check if field is getting changed and have something added into that, after that you can make other 2 fields not mandatory in the same script.
Thanks and Regards,
Rahul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2023 01:27 AM
Hi @Rahul Talreja ,
Thanks for giving the logic, can I get a script for that? because I tried my side didn't get the proper output.
Thanks,
Deepika
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2023 01:30 AM
Try with Onsubmit catalog client script.
function onSubmit() {
if(!g_form.getValue("var1_name") && !g_form.getValue("var2_name") && !g_form.getValue("var3_name")){
alert("Fill atleast one field from the below fields\n Variable 1\nVariable 2\nVariable\3");
return false;
}else{
return true;
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2023 01:33 AM
Hi @Deepika Ravindr ,
you need to write a onsubmit client script, something below:
It will check whether all the vaules, in the fields, If all are empty, then it will not allow user to submit.