Restrict Field input
Restrict Field input
Hi everyone, is it possible to restrict the input into a field so that it must start with the letters 'OI' or 'OID' ?
AppGini 22.13
Re: Restrict Field input
Try this in your tableName-dv.js:
Code: Select all
$j("#fieldName").attr("pattern", "OI.*");
Re: Restrict Field input
Thanks Alisson, nothing happens when I added this to the -dv.js file. I typed in ggfhfg and it let me save it ok?
AppGini 22.13
Re: Restrict Field input
Alisson, I just refreshed the page and it worked. is there a way to amend the message that pops up?
AppGini 22.13
Re: Restrict Field input
Alisson I found a solution to this, I added a title to the input tag on the DV templates file and it now comes through with a much easier to understand error. Only issue is that I will need to remember to update this on any changes.
appreciate your help
appreciate your help
AppGini 22.13
Re: Restrict Field input
Hi angus, just add another attribute to the code to modify the text.
Code: Select all
$j("#fieldName").attr("pattern", "OI.*").attr("title", "Must start with 'OI' or 'OID'");