Forum Discussion
JohnThomas
8 years agoQrew Cadet
If there is any native quick base option Please let me know that one
Other wise using javscript we can do this one
$("#_fid_45").keyup(function() {
let val = $(this).val();
if(val.length > 5) {
let digits = val.split(/(\d{1,5})/);
let str = "";
for (let group of digits)
{
if (/^\d+$/.test(group))
{
str += group + "-";
}
}
str = str.substring(0, str.length - 1);
$(this).val(str);
}
});
Insted of _fid_45 give your fid Id
Other wise using javscript we can do this one
$("#_fid_45").keyup(function() {
let val = $(this).val();
if(val.length > 5) {
let digits = val.split(/(\d{1,5})/);
let str = "";
for (let group of digits)
{
if (/^\d+$/.test(group))
{
str += group + "-";
}
}
str = str.substring(0, str.length - 1);
$(this).val(str);
}
});
Insted of _fid_45 give your fid Id
JohnThomas
8 years agoQrew Cadet
Using IOL Technique.
Create a formula text field and have the below code
Create a page in Pages name it module.js and have the above code
with field id replaced. Then it will work ,You can name the page
whatever but you need to make the same name on the formula Field
Create a formula text field and have the below code
Create a page in Pages name it module.js and have the above code
with field id replaced. Then it will work ,You can name the page
whatever but you need to make the same name on the formula Field
"<img qbu=\"module\" src=\"/i/clear2x2.gif\" " & "onload=\"javascript:if(typeof QBU=='undefined'){QBU={};$.getScript('" & URLRoot() & "db/" & Dbid() & "?a=dbpage&pagename=module.js&rand='+Math.random())}\">"