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.

Featured Replies

i have a database with a repeating field. i want to display this over the web. however, i only want to display it for the information that is actually there. not the blank repetitions. each record has a different amount of information in the field. how do i do this?

Timmy

The best solution is to get rid of the repeating field and use a related file and portal instead. it's not a lot of work and the benefits are great.

Otherwise if you want to continue with the repeating field, try using CDML [FMP-If: fieldrepetition.neq.] to only display the field if it is not empty.

I've never worked with repeating fields over the web.

Timmy,

Here is some Javascript I use for eleiminating any empty repeating fields.

[FMP-Record]

<a href="http://www.clarsys.com.au/tournsw/pdfs/[FMP-Field tongue.gif" border="0age].pdf" target="main">[FMP-Repeating:chapter]<script>if ("[FMP-RepeatingItem]" != "") {document.write("[FMP-RepeatingItem]<br>");}</script>[/FMP-Repeating]</a>

[/FMP-Record]

Hope this helps.

Garry

  • Author

Garry,

Your code works well, except, when i load the page, i now get "Unterminated string" errors. It doesn't do it for every instance of the repeating field. but it def has soemthing to do with it. it could just be a mistake in my HTML. do you know anything about this?

thanks again,

tim.

I haven't come across that error before. I wonder if you use the encoding parameter to better encapsulate the data from the database? Try using RAW, and see what happens.

[FMP-RepeatingItem: Encoding ]

Raw - Don't perform any encoding

URL - Perform URL encoding

HTML - (default) Perform HTML encoding

Break - Perform HTML encoding and replace soft returns with <br>

I will be travelling for the next couple of days. I will be able to do some tests after that. All the best.

Garry

  • Author

hey garry,

i figured it out, i just had bad HTML code. thanks again for everything,

timmy.

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.