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.

Formaing Date Fields on Web page

Featured Replies

I have a page that returns a list of records containing dates, like this...

[FMP-Record]

[FMP-Field :Date Field], [FMP-Field :Date Field].... and so on...

[/FMP-Record]

The HTML output looks like "10/20/2000"

I want it to look like "10/20"

Is there a way to specify date formating with CDML?

Thanks,

G

[This message has been edited by spragueg (edited October 20, 2000).]

Try formating the date as you want it to display in the FMP layout and then use [FMP-Field laugh.gifate Field, format] in the CDML.

  • Author

How does CDML know which layout to use? I have layouts that use long dates and others which display it short. Do I have to specify which layout somehow? I looked at the -Lay and [FMP-LayoutFields] tag but neither seem to have anything to do with format acording to the CDML Reference DB.

G

In the HTML/CDML source that you use to query and load the result page, you will specify the database (-db) and layout (-lay) to use. I only have the CDML/web reference for 4.1, so don't have the reference for the new 5.0 "Format" parameter (I read it in a post somewhere), but I am assuming that it is used like the "Raw" or "URL" parameter, which is documented under the "Field" section.

  • Author

I got it.

I used the -Lay=Layout Name in the request

and [FMP-Field:Field Name, format]

FMPused the formats from that Layout. I worked great. Thanks for your help

One thing you should make sure abour if you are using layout names in your online databases is to make sure all layouts have no spaces in their names. I have found this makes them unusable in INLINEACTION tags [fmp-inlineaction]

Simon

I've also found it a good practice not to use spaces in field names for databases that will be set up for the web. I use underscores instead. It doesn't matter for FMP but some javascript tricks won't work if the field names have spaces.

Simon (or anyone)

Can you discuss the inline action cdml tags. I just upgraded to FMP5 and am sorely missing the CDML reference. I know all the FMP4 tags but none of the FMP5 ones!

Thanks.

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.