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.

field format to display html in a FMPro field correctly

Featured Replies

What is the best way in CDML to display field content. I have two issues. When a client adds returns in a FMPro field they don't display correctly when viewed on the web. The returns don't display at all on the Mac and will only act as returns on the PC if he adds a space after each return.

Also, is there a way to display urls as links. It doesn't seem to work to add the <a href> and </a> tags. Instead of a link, you just see the tags "printed" in the field.

I know that there are options for the fields when creating CDML, ie. raw, html, etc, but I've never figured them out.

For the text to display on the web, create a calculation field. If the comment field is 'comment', create one called 'comment_html', for instance. It should be a calculation set to: Substitute(comment, "***new paragraph symbol***", "<br>"). In your CDML, the tag will look like: [FMP-field: comment_html, Raw].

As far as URL's as links, I assume that the URL link is a field in the database . Your CDML should simply be:

<a href="[FMP-field: URL_field_name]">insert whatever should display on the page here</a>

  • Author

Thanks for the info. Works great.

One questions though. My url's aren't in separate fields. A calculation to replace carriage returns is easy. How about a calculation that would find a word that would contain a ".htm" in it so I could bracket the word with the proper href tags?

If the URL is in a field and needs to be parsed out then you're getting complicated. If you are sure that every URL ends in '.htm' then it's relatively easy. However, some urls simply end in .com, .net, maybe a back slash, perhaps .asp, .cfm, you get the idea.

If every URL begins with http:// you could approach it that way, if it's consistent.

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.