Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Using Javascript to Format a Textfield

Featured Replies

  • Newbies

Hi Everyone,

This is my first post, and I think this is the correct board to post, but if not, I'm sorry. Anyway, my question is about using Javascript on a page that is powered by FileMaker. I have a javascript that formats a text field's contents into looking like a phone number. Like so: (NNN)NNN-NNNN so as you are typing the numbers the dash and parenthesis gets put in while you are typing. I was wondering if there is any way I can use this javascript to make the FileMaker generated pages/textfields do the same. Or would I have to create my own web interface in order to do this? If the later, does anyone know of books, websites or other resource where I can find information on doing this?

Thanks in advance, if my question was not clear enough just let me know and I will elaborate a little more.

Sandro Padin

You can assign the field value to a Javascript variable; e.g.:

jsPhoneNum = "[FMP-Field:fmPhoneNum]";

All the best.

Garry

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.