Trying to create a field which accepts alphanumeric values

prudhvig
Tera Expert

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.

5 REPLIES 5

Mihir Mohanta
Kilo Sage

Create a string type field and add a client script which will validate value of this field to accept only alphanumeric values.


Hi Mihir,



Do you have that client script with you already? Please let me know.


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.


Kusuma2
Kilo Guru

Hi Prudhvi,



Please follow the below screen shot:



find_real_file.png


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.