Jump to content

Input Masks


Recommended Posts

In MS Access you can define an input mask to control how data is entered in a particular field. Is that possible in Caspio Bridge? For instance, if I want the telephone field to display phone numbers as (800) 555-1212 how can that be accomplished, if at all? The input mask format for phone number in MS Access is:

!\(999") "000\-0000;0;_

Thanks

Jay Dyson

Link to comment
Share on other sites

Hi Jay,

This is not a standard feature of Caspio Bridge but you can achieve this by Java Script programming.

If you are familiar with Java Script, you can write the code in an HTML block of the DataPage, otherwise you can ask Caspio Professional Service department to write the script.

You can submit a request at http://www.caspio.com/services/services.asp.

To get an idea how Java Scripts could be integrated with Caspio DataPages see the library of Java Scripts at http://www.caspio.com/support/jssolution.asp

Best,

Bahar M.

Link to comment
Share on other sites

  • 2 years later...

In MS Access you can define an input mask to control how data is entered in a particular field. Is that possible in Caspio Bridge? For instance, if I want the telephone field to display phone numbers as (800) 555-1212 how can that be accomplished, if at all? The input mask format for phone number in MS Access is:

!\(999") "000\-0000;0;_

Thanks

Jay Dyson

Hi Jay,

heres a js to validate a north america phone number format, enjoy !

PS: this code will work if the end-user enter a 10 digits number

- you have a field nammed "TEL"

- you can add a button in your form to check if the function works : add a html block and paste:

(once you verified your code, you can hide your button with adding before the button

or you can delete it, because the code will be applied once the end-user will click "submit"

- then on your footer paste :

function tel()

{

var message = document.getElementById("InsertRecordTEL").value; // here you get what the end-user typed

document.getElementById("InsertRecordTEL").value = (message.replace(/[^\d]/g, '')); // then you strip off all the spaces

var message1 = document.getElementById("InsertRecordTEL").value;

document.getElementById("InsertRecordTEL").value = ("(" + message1.substring(0,3) + ") " + message1.substring(3,6) + "-" + message1.substring(6,10));

}

document.getElementById("caspioform").onsubmit=tel;

Link to comment
Share on other sites

  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...