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.

Fixing the font in a field, locking out use of any other font.

Featured Replies

Does anybody know how to set up a FMP8 DB so that the font is absolutely fixed in a field.

I have a problem that if people paste stuff from another source in to a field it takes the pasted font. I would like to ‘lock’ the field so it records everything in the font I preset and at the size too, so no other options are possible. Thanks.

Edited by Guest
The Topic: <a href="http://fmforums.com/forum/showtopic.php?tid/210287">Fixing the font in a field, locking out use of any other font.</a> was moved from <a href="http://fmforums.com/forum/showforum.php?fid/80">User Group Central - Sponsored by FMPug.com

Use the Auto Enter Option for the field with the TextFormatRemove ( text ) as the calculation.

Click on the field you are wanting to control in the "Define Database"

Click on the Options for the Text Field

Click on the Auto Enter Tab

Click on the "Calculated Value"

Select TextFormatRemove ( text ) From the list of Text Formatting Functions, and modify for your field name.

Click Okay

[color:red]Deselect the checkbox

"Do not replace existing values (if any)

HTH

Lee

Edited by Guest

  • Author

Hi Lee,

Sorry but it does not work.

Field command now reads: "TextFormatRemove ( Notes )" BTW, field is called "Notes".

and in "Define Database" it now reads:

Notes - Text - Indexed, Auto-enter Calculation replaces existing value.

Auto Enter only works on new records, if you are trying to do this with existing data, then you will need to use it in a Loop Script.

removeStyle

Go to Layout [ original layout ]

Go to Record/Request/Page

[ First ]

Loop

Set Field [ Notes; TextFormatRemove ( Notes ) ]

Go to Record/Request/Page

[ Next; Exit after last ]

End Loop

HTH

Lee

  • Author

Auto Enter only works on new records, if you are trying to do this with existing data, then you will need to use it in a Loop Script.

I did try that in a new document and just tried again, no luck it just pasts in the font as in original doc. Did you realise I am in V8? Or does this not matter?

The Auto Enter Calculation should work. However be sure that you have [color:red]deselect the check box I mentioned above.

The script should work once you select your field info.

If this doesn't help, then I suggest your post a NO RECORDS clone of your file so that we can see first hand what isn't working.

HTH

Lee

[color:red]p.s.

I'm headed out of town for the day, I check back later to so if you have received help or solved your problem..

Edited by Guest
ps

  • Author

The Auto Enter Calculation should work. However be sure that you have deselect the check box I mentioned above.

I did

The script should work once you select your field info.

Sorry no luck

If this doesn't help, then I suggest your post a NO RECORDS clone of your file so that we can see first hand what isn't working.

Not sure how to do it in the forum, so it is here:

http://www.megafileupload.com/en/file/122154/Empty-fp7.html

Not sure how to do it in the forum, so it is here:

It really isn't that hard.

First, Zip your file.

Then, when you make a reply to your Thread.

Look down the page and you will see

File Attachments: 0

Valid file types: zip, txt, pdf, bmp, gif, jpg, png, sit, mov [color:orange]Manage files

Select

[color:orange]Manage files

A popup windoow will appear.

Click on "Choose File"

find your archived file, and select it.

Then click on "ADD"

it will upload, when it is done,

Click on Finished.

HTH

Lee

  • Author

Lee, thank you, I just fixed it. Must have been a bug somewhere, after I did a restart it worked! I have had this before with FMP8, and not sure as to why. anyway, thanks for your help!

I should have picked up on your versions. Although I use Version 8 occasionally to verify that what I have suggested will work, it isn't supported in Leopard. AFAIK, only versions 8.5 and 9 had patches for Leopard?

Lee

  • Author

, then you will need to use it in a Loop Script.

removeStyle

Go to Layout [ original layout ]

Go to Record/Request/Page

[ First ]

Loop

Set Field [ Notes; TextFormatRemove ( Notes ) ]

Go to Record/Request/Page

[ Next; Exit after last ]

End Loop

It would be nice to clean up the other fields, but unfortunately I do not understand these instructions.

are we in Layout mode? because in that case I do not know where to find the first or second instruction. Sorry for being thick.

  • Author

AFAIK, only versions 8.5 and 9 had patches for Leopard?

aha that would explain it!

I made a demo of the file, look at the Script and maybe this will help you.

Lee

ChangeAgent.fp7.zip

  • Author

Lee thank you you ares so kind.

am I pushing my luck if I wanted to use this script, but if the text was bold, maintain the bold?

Is there a pattern to what you want bold?

An example would be helpful.

Lee

  • Author

Morning Lee,

sorry for the delay, I am in a different time-zone as you and away from my office a lot at the moment.

No there is not, some people (who entered stuff) might have added bold a random places.

Try usign the TextFontRemove() and TextSizeRemove() functions instead.

TextFontRemove ( TextSizeRemove ( text ) )

will remove any font and size formatting, and keep other style elements such as bold or italic and color.

  • Author

works! thanks! learning all the time....

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.