- 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
‎01-02-2015 04:21 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 ;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-02-2015 06:16 AM
Harish I now have an onSubmit client script on the Order Guide Table with the following script and it still isn't working:-
function onSubmit() {
if (g_form.getValue('adaccount variablename') == 'false' && g_form.getValue('opus variablename') == 'false' && g_form.getValue('pkms variablename') == 'false' && g_form.getValue('coda variablename') == 'false' && g_form.getValue('vision variablename') == 'false' && g_form.getValue('trf variablename') == 'false' && g_form.getValue('ace variablename') == 'false' && g_form.getValue('tms variaible name') == 'false' && g_form.getValue('e400 variablename') == 'false' && g_form.getValue('u_other_amendments variablename') == '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
‎12-31-2014 03:44 AM
is the account a variable on the form or set of variables ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-31-2014 03:53 AM
The user details name, telephone number etc, are variables.
The accounts are part of the rule base and are order items each of which has a few (different variable)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-31-2014 03:58 AM
Can't you add the account in a drop down variable and make it mandatory ?