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.

FMP 17 create a button to format text in a text field. 

Featured Replies

Is this at all possible?

 

I want to have two buttons that will each do the following. 

Have one button to ‘Strike Thru’ text that is highlighted before.  Means not all the text in the field will be changed.

And one button to change the text colour to Red, again highlighted before.  Means not all the text in the field will be changed.

 

Any tips how to do this?  Please bare in mind I am a FMP beginner.  Thanks. 

7 hours ago, ChangeAgent said:

Have one button to ‘Strike Thru’ text that is highlighted before. 

Assuming "highlighted" mean selected, make your button insert a calculated result =

TextStyleAdd ( Middle ( Get ( ActiveFieldContents ) ; Get ( ActiveSelectionStart ) ; Get ( ActiveSelectionSize ) ) ; Strikethrough )
7 hours ago, ChangeAgent said:

one button to change the text colour to Red,

Same thing - just use the TextColor() function instead.

Do note that this may exhibit some quirky behavior when the text already has some styling at the insertion point.

 

7 hours ago, ChangeAgent said:

Please bare in mind

I prefer to remain clothed.

 

Edited by comment

  • Author

thanks will experiment with your tips.  

  • 2 months later...

Perhaps add a "TextFormatRemove" (using comment's calculation as a script step) just before the TextStyleAdd step would clear up any quirky behavior.  Of course, you'd have to be careful because that would remove ALL previous formatting from the text.

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.