2 Replies Latest reply on May 7, 2009 7:59 AM by richard_mallion_1

    CWP and Text formating

    richard_mallion

      Title

      CWP and Text formating

      Your post

      HI There

       

      I'm using custom web publishing to serve some data to our web site.

       

      Is there any way to display the contents of a field as its been formatted in FileMaker?

       

      Our biggest problem are carriage returns. These seem to get stripped when displayed via CWP.

       

      Any help would be appreciated.

       

      Thanks

       

      Richard 

        • 1. Re: CWP and Text formating
          joeparent
            

          You may have found a solution to this already seeing as how it's been several months since you posted this question.  I saw it today as a new member to the forums and thought I'd reply in case you hadn't found anything satisfactory.

           

          There are two ways to preserve for the web the formatting of text as it appears in FileMaker:  use the GetAsCSS or GetAsSVG calculations.

           

          Example with GetAsCSS:

           

          Suppose you have a database with a text field called Description that you want to publish on the web and display as formatted in FileMaker.  Create a calculation field called Description_Web with the calculation being GetAsCSS ( Description ).  Field defs:

          Field Name  Type Options / Comments
          Description
          Text
          Description_Web
          Calculation  = GetAsCSS ( Description )

           

          Contents comparison:

           

          Description:

          This is a test of text in a field.
          It has carriage returns.

          The end.

           

          Description_Web:

          <SPAN STYLE= "font-family: 'Helvetica';" >This is a test of text in a field.<BR>It has carriage returns.<BR><BR>The end.</SPAN>

           

          Hope that helps!

           

          -Joe. 

          • 2. Re: CWP and Text formating
            richard_mallion_1
              

            Hi Joseph

             

            I really appreciate this. Kind of gave up but your solution works a treat.

             

            Again many thanks

             

            Richard