- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-31-2014 02:35 AM
We have an order guide that contains a series of variables for user information and then lists a series of accounts the user can request.
As things stand if the user doesn't choose an account and then selects the 'Choose Options' button it falls over so I need to find a way to force the user to select at least one of these accounts before they can select 'Choose Options'.
Any input gratefully received.
Solved! Go to Solution.
- Labels:
-
User Interface (UI)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-02-2015 06:23 AM
Your 'onSubmit' client script should be against the catalog item (the actual item/order guide), not on the Order Guide table. Use the 'Client Scripts' related list at the bottom of your order guide form to add the necessary catalog client script. If the related list isn't there, you'll need to personalize related lists to add it.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-31-2014 02:42 AM
Write onsubmit script on order guide and check either atlease one account selected ot not
ex:
if(account1 == false && account == false)
{
alert('Please select atlease one account');
return false;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-31-2014 02:48 AM
Thanks Harish I'll give that a try.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-02-2015 04:08 AM
Harish I've tried this but get a syntax error on line 3 column 21?
function onSubmit() {
if (item.AD Account == false && item.OPUS == false && item.PKMS == false && item.CODA == false && item.Vision == false && item.TRF == false && item.ACE == false && item.TMS == false && item.E400 == false)
alert('Please select at least one account before continuing');
return false;
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-02-2015 04:19 AM
If the choices are checkboxes use below code
if (g_form.getValue('AD Account varablename') == 'false' && g_form.getValue('item.OPUS varablename') == 'false' && g_form.getValue('item.PKMS varablename') == 'false' && g_form.getValue('item.CODA variablename') == 'false' && g_form.getValue('item.Vision varablename') == 'false' && g_form.getValue('item.TRF variablename') == 'false' && g_form.getValue('item.ACE varablename') == 'false' && g_form.getValue('item.TMS varaible name') == 'false' && g_form.getValue('item.E400 varablename') == 'false')
alert('Please select at least one account before continuing');
return false;
}
If its fre form text use below code
if (g_form.getValue('AD Account varablename') == '' && g_form.getValue('item.OPUS varablename') == '' && g_form.getValue('item.PKMS varablename') == '' && g_form.getValue('item.CODA variablename') == '' && g_form.getValue('item.Vision varablename') == '' && g_form.getValue('item.TRF variablename') == '' && g_form.getValue('item.ACE varablename') == '' && g_form.getValue('item.TMS varaible name') == '' && g_form.getValue('item.E400 varablename') == '')
alert('Please select at least one account before continuing');
return ;
}