June 6, 200124 yr What is the best way in CDML to display field content. I have two issues. When a client adds returns in a FMPro field they don't display correctly when viewed on the web. The returns don't display at all on the Mac and will only act as returns on the PC if he adds a space after each return. Also, is there a way to display urls as links. It doesn't seem to work to add the <a href> and </a> tags. Instead of a link, you just see the tags "printed" in the field. I know that there are options for the fields when creating CDML, ie. raw, html, etc, but I've never figured them out.
June 7, 200124 yr The CDL tag for field has an encoding option that will do all this. [FMP-Field: fieldname, encoding] html (default) performs html encoding on the field data, so text appears as plain text. break performs html encoding but puts a <br> where a carriage return is in the data raw perfroms no encoding, so any html codes are interpreted by the browser as HTML. To get your links to work, use raw encoding. To get plain text to display line breaks, use break.
Create an account or sign in to comment