JayDee Posted December 1, 2008 Report Share Posted December 1, 2008 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 Quote Link to comment Share on other sites More sharing options...
bahar_vm Posted December 3, 2008 Report Share Posted December 3, 2008 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. Quote Link to comment Share on other sites More sharing options...
Isabelleg Posted November 21, 2011 Report Share Posted November 21, 2011 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; Quote Link to comment Share on other sites More sharing options...
MayMusic Posted December 14, 2013 Report Share Posted December 14, 2013 Refer to this post http://forums.caspio.com/index.php/topic/2692-auto-format-a-phone-number-field-javascript/?hl=phone#entry8567 Quote Link to comment Share on other sites More sharing options...
perland Posted December 14, 2013 Report Share Posted December 14, 2013 You may also check this post. http://forums.caspio.com/index.php/topic/4224-convert-text-number-to-phone-format/?p=13380 Quote Link to comment Share on other sites More sharing options...
MayMusic Posted December 18, 2013 Report Share Posted December 18, 2013 Thank you that too Quote Link to comment Share on other sites More sharing options...
Meekeee Posted October 25, 2021 Report Share Posted October 25, 2021 Hi! Just an update on this, Caspio has a new Tech Tip called: Format Phone Number in DataPages. You may visit it here: https://howto.caspio.com/tech-tips-and-articles/advanced-customizations/format-phone-number-in-datapages/ Hope it helps! Quote Link to comment Share on other sites More sharing options...
Meekeee Posted July 8, 2022 Report Share Posted July 8, 2022 Hi All - In relation to Caspio's new feature of Worldwide SMS Notifications, if you would like your input phone number fields to be automatically formatted - you can use the International Telephone Input plugin. This JavaScript plugin is used for entering and validating international telephone numbers. It adds a flag dropdown to any input, detects the user's country, displays a relevant placeholder, and provides formatting/validation methods. To know more of the customization, you can check this link: https://github.com/jackocnr/intl-tel-input Here's a sample result in DataPage: After submission in table: Related articles: https://howto.caspio.com/notifications/sms-notifications/configuring-the-sms-enabled-countries/https://howto.caspio.com/release-notes/caspio-32-0/ Hope it helps! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.