Trying to create a field which accepts alphanumeric values
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2017 02:40 AM
Hi,
I need to record the Job Id on a Project form. For that, I have to create a custom field which accepts alphanumeric values. To achieve this, which type of field should I create?
Please let me know. Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2017 02:44 AM
Create a string type field and add a client script which will validate value of this field to accept only alphanumeric values.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2017 02:47 AM
Hi Mihir,
Do you have that client script with you already? Please let me know.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2017 02:55 AM
Hi Mihir,
I don't want the field to accept only alphanumeric values. It can accept any values, but it has to accept alphanumeric values also.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2017 02:55 AM
Hi Prudhvi,
Please follow the below screen shot:
function onChange(control, oldValue, newValue, isLoading) {
if(isLoading || newValue == ''){
return;
}
var pattern = /^[0-9a-zA-Z]*$/;
if(!pattern.test(newValue))
{
alert('type your appropriate comments here');
g_form.setValue('account_name', ''); // adjust field name accordingly if you want to blank it out.
}
I hope response is good enough to proceed further. Please provide your feedback appropriately (Like, Helpful, Endorse AND/OR Correct) to help community.
Regards,
Ajay.