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

Reverting Text Font, Size and style to the default

Featured Replies

  • Newbies

Help needed: Is there anyway to make text revert to the field default with regards to its style, size & font.

The situation is that my clients copy and paste a lot of data from the internet into various fields in the database. I'd really love it if there was an easy way for the sometimes huge and colored text that gets pasted in, to be reverted to the default for the field.

I don't think there is anyway to make the field not allow the text attributes to be overwritten, but is there a function or combo of functions that I can use in a script to make it conform. I realize that the new FM7 text formating functions has a remove style function... but there is no remove overwritten size, color, and font. The other functions there can be used to force text to be a certain font, size, or color...but then I'd have to write a script for each field that had different defaults.

What i'd like to do it make a universal - revert to text to default - and set it to Command+1 in the scripts menu so that when they paste a funky piece of text, they can punch the key combo command to have the text conform in any field they use.

Thanks

use the set field step and set the field to itself. that should change any formatting to the default for that field...

Welcome Werker,

If you hold down the option key as you paste, that will paste without style. But for a more foolproof solution, you could use this Auto-entered calc, defined on the fields that users paste stuff into:

Evaluate ( Quote ( Field ) )

This could alternatively be used in a Set Field script or a Replace, if it's a one-time thing.

Elvis wrote: "use the set field step and set the field to itself. that should change any formatting to the default for that field"

This works a treat in FMP 6 and earlier, because character formatting is lost by the calculation engine.

However in FMP 7 and later, character formatting is preserved by the calculation engine, so it does not strip formatting like it used to.

One common expression for stripping formatting that pops up often in Forums lke this is

Evaluate( Quote ( textfield ) )

  • Author
  • Newbies

Probably too late a reply for anyone to notice, but thanks for the help everybody!

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.