LyaP Posted June 28, 2016 Report Share Posted June 28, 2016 I have the Javascript in our submission form to format the phone numbers to this format: (123) 456-7890, but sometime I need to add an extension to that. Is there a way to edit the Javascript so that I have the option to have it look like this: (123) 456-7890 x123. I don't want to have a separate column in the table to add an extension because they aren't always there and it will show up funny in the results tables. Any thoughts? Quote Link to comment Share on other sites More sharing options...
MayMusic Posted June 28, 2016 Report Share Posted June 28, 2016 Even if there is no extension I still recommend you to add another field for it. You can choose to hide the field if it is blank on your report or details page. Quote Link to comment Share on other sites More sharing options...
LyaP Posted June 28, 2016 Author Report Share Posted June 28, 2016 Is there a way to hide if blank on a report table? I can only find it in the details section. Quote Link to comment Share on other sites More sharing options...
MayMusic Posted June 28, 2016 Report Share Posted June 28, 2016 If you have a list or gallery report yes you can hide it, if it is only for showing purposes on tabular report page you can add HTML Block and select both phone and extension field in HTML Block. If the ext is blank only number will appear Quote Link to comment Share on other sites More sharing options...
LyaP Posted June 28, 2016 Author Report Share Posted June 28, 2016 Thanks May, can you explain the HTML option a bit more. Essentially we have contact listed in a tabular report page usually with just phone numbers, occassionally those phone numbers have extensions. What I would like is to either have the extension directly in the phone number field or to have a column in the table that is labled EXT. that disappears when that information is blank for all information pulled into the table. I need the extension information to show up once they click details if there is one. Thanks for all your help! Quote Link to comment Share on other sites More sharing options...
MayMusic Posted June 28, 2016 Report Share Posted June 28, 2016 Edit your report page navigate to Configure Result Page Fields screen, use insert button on bottom right corner of element panel to add a HTML Block to the element list. There is a picker which you can use to select which fields you want to show in this column http://howto.caspio.com/datapages/datapage-components/html-blocks/ Quote Link to comment Share on other sites More sharing options...
LyaP Posted June 28, 2016 Author Report Share Posted June 28, 2016 Great got it, that works perfect! Quote Link to comment Share on other sites More sharing options...
MayMusic Posted June 28, 2016 Report Share Posted June 28, 2016 I am glad I could be a help 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 15, 2022 Report Share Posted July 15, 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.