Skip 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.

Carriage returns in html

Featured Replies

This may be an easy fix, I'm sure someone's encountered it before, but my search on this site produced nothing...

I have a field that has check boxes with a value list. When I display this field on the web, it makes returns after each value of the checklist.

Normally this would be fine, but it's being used in a document.write, which is freaking out because of the line break.

Is there any way (perhaps along the lines of the 'raw' attribute), that I can have this data displayed without line breaks?

Use a calculated field equal to Substitute( field, "

  • Author

Is there a CDML solution?

Or javascript not worrying so much about a break in the line?

  • Author

Well, using the 'break' encoding offers a decent solution...The javascript works but there is a <br> between each value.

Here is some Javascript that you can combine with the [FMP-Field:xxx,Break] tag.


<body>The first Line<br>

<script>

myfield = "hello<br>World<br>from<br>Garry.";

document.write(myfield.replace(/<br>/g, " "));

document.write("<br>");

</script>

The Last Line</body>

Hope this helps.

Garry

  • Author

Awesome, I dont know much javascript, so that is extremely helpful!

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.