How can I make a HTML field mandatory?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2012 03:05 AM
Hi all,
In order to provide some appropriate feedback to our customers, we use a resolution field, which is a mandatory field. Recently, we changed the field type from string to a HTML field. The old script isn't working anymore, because on submit, there's always some html tagging in the field, depending on the type of browser.
function onSubmit(){
var button = g_form.getActionName();
var call_state = g_form.getValue('u_call_status');
if (button == 'close_call'&& call_state == '8') {
var closenotes=g_form.getValue('u_call_resolution');
if (closenotes =='') {
alert('Call resolution is mandatory');
return false;
}
}
}
To cover all of the browser options, I added tag values for the closenotes variable. This isn't working either.
Any thoughts how I can solve this?
Greetz, Gerrit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2012 07:18 AM
If using UI Policy to make an HTML field mandatory isn't working, that's a bug. UI Policy should just work, despite browser preference.
If doing a g_form.setMandatory("u_your_html_field", true); in a Client Script isn't working for a given browser, that's also a bug.
In either case, an Incident with Customer Support will be the way to go so they can get a Problem opened after verifying.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2012 07:35 AM
CapaJC, thx for your quick response, willdo!
Greetz Gerrit