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.

Displaying found records across page

Featured Replies

Hi all,

Is it possible in FM6 using CDML to create a HTML results page that goes across the page as well as down. So example would be :-

-----------------------------

record1 | record2 | record3

-----------------------------

record4 | record5 | record6

-----------------------------

etc, etc. Just listing the records one after the other in a list is easy, just wanted to know if I could achieve the above as an alternative.

Many thanks,

Zenoah

Try something like this:




[FMP-Record] 

if ((i % nCols) == 0) 

   {

   document.write("[FMP-Field:myfield]

   } 

else 

   { 

   document.write("[FMP-Field:myfield]");

   }; 

i++ ;[/FMP-Record] 

 

All the best.

Garry

  • Author

Thanks for that.

So I'm guessing there's no way of doing the equivalent in pure CDML?

Wanted to stay clear of scripting tbo as the above for example doesnt let you design the table 'visually' in Frontpage.

Some people have created Calculation fields that use the CurrentRecordNumber in conjunction with [FMP-IF] tags.

Do a search on "columns" in the CDML forum.

Good Luck.

Garry

Garry,

I copied your javascript, but I have no javascript understanding. What needs to be changed to change the number of columns?

Change this line:

For example for three columns:

All the best.

Garry

Thank you!

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.