Jump to content
LyaP

JavaScript Phone Formatting - Add Extension

Recommended Posts

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?

 

:)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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/

Share this post


Link to post
Share on other sites

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...

×
×
  • Create New...