- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-14-2014 10:32 AM
I am playing around with a new True/False element on my Incident form, that simply asks the end user who is using the Incident form, "Has the location been verified?". I went to True/False, because this is the only way I could find to get a check box on the Incident form.
In brief, I want the end user to Check this True/False, thus making it True, when they have confirmed the customer's location. Because this True/False is a boolean, I have not seen an easy way to make it Mandatory (because what is mandatory in true and false?), so I was wondering if I could use a Client Script that checks if the value of this True/False to be True, and not False, when the page is saved/submitted etc? Any other good way to do this?
Much thanks.
Solved! Go to Solution.
- Labels:
-
User Interface (UI)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2014 01:36 AM
Hi Shane,
I have tried similar things and I always switched to a standard string field with Yes/no as a choice list. This way you can have the the default to 'nothing' and thus forcing the user to select either yes or no.
Regards,
Daniel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-14-2014 12:28 PM
Even if you create a UI Policy to make it mandatory, it would force users to check the box always. Its better to create Client script and check the value as True /False. In addition if required you can add a pop-up message to confirm the value with the incident submitter.
Or give the default value as True/False and ask the user to verify if they have checked with the user for the location as a pop up when trying to submit the incident.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-14-2014 12:32 PM
Thanks for the response. Any idea what kind of code I am looking at to perform that kind of client script?
The verify popup route is something I'd want to come up, only if they have not marked the true/false as True, as False would be the default on page load (as, we do not know yet if the user has confirmed the client location).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-14-2014 01:16 PM
Shane, this is a pretty simple script. This will be an onSubmit client script. It will look something like this:
function onSubmit(){
var locVerified = g_form.getValue('u_location_verification'); //this is your true/false field name
if(!locVerified){ //is our variable set to false?
alert('Please ensure to verify the location with the customer.');
return false; //if we return false, then the update/sumbission of the record will be aborted
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-14-2014 02:23 PM
Thanks for this, just testing it now. By default I would have to load up the form value as False, for this to work, correct?
Is this just as easy as going into the dictionary of this form item, and setting a default value of False?