Jump to content

This topic is 7578 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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?

Posted

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

This topic is 7578 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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