Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

I have a web site that is presenting data from fields in a Filemaker Database. FM 11 Server. When viewing the text in a browser it does not see the carriage returns. Is there a way to embed some html/php in the field so that the browser will add in carriage returns?

Posted

HTML ignores carriage returns.  Try Substitute(YourWebText; "¶"; "<br />")

Posted

Why don't you zip a copy of your file with a few sample records and post it?

Posted

I couldn't find any way from anybody on how to type something into the text field that would be respected by a browser. But I did find a PHP function that does what I need.

 

So the original html/php code was: 

 

<dd><?php echo $record->getField("Field_Name"); ?></dd>

 

The revised code is:

 

<dd><?php echo nl2br($record->getField("Field_Name")); ?></dd>

 

which has the effect of rendering the breaks typed into the Filemaker text field in the browser.

Posted

you can use getFieldUnencoded in your php code to see the text with the html attributes

 

Martie

This topic is 4283 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.