- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-29-2024 01:04 AM
I have a List Collector Variable, In this I want to restrict the selection of number of choices to two only. So, that user can able to select two options only. How to Perform this.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-29-2024 01:23 AM
I can see OnChange
Regards,
Piyush Sain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-29-2024 01:07 AM - edited ‎01-29-2024 01:08 AM
Hi @Aditya02 ,
Create onSubmit catalog client script
function onSubmit()
var values = g_form.getValue('variableName').toString().split(',');
if(values.length > 2){
alert('Please select only 2 choices');
return false;
}
}
Regards,
Piyush Sain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-29-2024 01:13 AM
can we able to do anything , when user selecting of choices itself, instead of before submitting the form.
while selecting itself, he should not able select more than 2 choices.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-29-2024 01:17 AM
You can use onClick for it and restrict adding more than two
Regards,
Piyush Sain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-29-2024 01:19 AM - edited ‎01-29-2024 01:20 AM
There is No such Onclick type, Only has these types:
1. Onchange
2. Onsubmit
3. Onceledit
4. Onload