Jump to content
Jason Mundok

Display FileMaker Text Field Formatting through PHP API

Recommended Posts

I have a website that is displaying FileMaker data using the PHP API. Is there a way for the web site to display the basic text formatting from a FileMaker field? For example, a few words in the comments field are bold in FileMaker and I would like them to also be bold on the website. Thanks for any ideas.

Share this post


Link to post
Share on other sites

This is true for FileMaker 11, unless FileMaker made some serious upgrades to their php api after this; here is my piece of advice. As a rule of thumb what you export when you export to XML for FileMaker is what you can bring to the web. That said I'd imagine you can make a supporting field that holds the info you are after.

Edited by ggt667

Share this post


Link to post
Share on other sites

don't know that you can... but perhaps if you have a shadow field that uses GetAsCSS() on your original field, that could give you something to work with?

Share this post


Link to post
Share on other sites

Thanks, Wim. That was suggested elsewhere as well. I'm going to try it a little later and I'll post back with the results.

Share this post


Link to post
Share on other sites

It looks like you should be able to do GetAsCSS( fieldname ) and then use the output of that in its own field. No need for supporting/shadow field: http://www.filemaker.com/help/12/fmp/html/func_ref3.33.54.html Yet you will have to override CSS font or be stuck with whichever font is put inside FileMaker by the looks of it.

Edited by ggt667

Share this post


Link to post
Share on other sites

GetAsCSS worked as a solution for this.

Share this post


Link to post
Share on other sites

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

  • Similar Content

    • By jstewart30
      Running FMS 13 and trying to run a simple PHP page from my website to access a database, but I'm only getting a blank page.  Not sure if it's a port forwarding issue or a PHP issue, or something else.  If I put my .php file and the includes ("FileMaker.php" file and "FileMaker" folder from the FMS PHP .zip file) in the fmi-test folder on my FM server and access it locally (http://localhost/fmi-test/myphpfile.php), the PHP file works fine and returns data, so I don't think it has any inherent issues, and presumably my FMS is set up correctly.  Putting the same .php file and includes on my web server, though, results in a blank page only.  The includes are in the same directory as the php file itself.  Here's the php file (I've changed the IP address and database names to protect the innocent but they're correct):
       
      <?php
      error_reporting(E_ALL);
      ini_set('display_errors', 1);
      include_once('FileMaker.php');  /* have also used require, include, and require_once with no change */

      $fm = new FileMaker("MyDatabase", "http://myfilemakerserver:8888", "Admin", "");   /*no password*/
      $findCommand = $fm->newFindCommand("MyDatabase");
      $findCommand->addFindCriterion("Phone", "303-555-1234");
      $findCommand->setRange(0, 1);
      $result = $findCommand->execute();
      if (FileMaker::isError($result)) {
          echo($result->getMessage());
          return;
      }
      $record = $result->getFirstRecord();
      $name = $record->getField("Customer Name");
      $status = $record->getField("Status");
      echo("$name - $status");
      ?>
      Infuriatingly I get no errors or feedback, just a blank page when I run this file from my website (but again it works fine locally on the FM server machine). I've confirmed PHP is working on my website as I can do a simple phpinfo() file in the same directory and it runs fine and displays the PHP info.  If I direct a web browser to the same "http://myfilemakerserver:8888" (not the real address obviously, but it is port 8888) I get the "Filemaker Database Server Website" page, so the port forwarding seems to be correct.  I have port 8888 forwarding to port 80 of my FM Server.  I don't have port 443 forwarded to that machine as that's being used for another device on our network, but I assume if I'm not making "https" requests that it should work fine (but maybe that's my problem?).  
      I assume it's just something simple but I've been beating my head against a wall for the better part of the day on this.  Any help would be greatly appreciated.
    • By Joost Miltenburg
      LS,
      We are running FMserver with custom webpublishing. People can connect to the website and see pictures that are attached to propositions.
      The pictures folder is located on the FMServer as well and getting pretty big now. So we are complating moving the folder ( it is currently located in htdocs ( running on a Mac )).
      How do we reconfigure FMServer/apache to do this?
      Kind regards....
    • By Martin Taylor
      Hi all experts (hopefully), I have just upgraded from FMS12 to FMS16. On the FMS12 server we are running a php solution. I have installed 16 onto a new server, uploaded all the databases (all successfully running) and have copied the php website to the new location on the 16 server. I can see the website from home (so I know the website is in the right place and the DNS s working) BUT I can't seem to connect to the database successfully. Any help would be much appreciated. Thanks in advance. 
      Oh, and it is accessed with https
    • By Tony Morosco
      Hello,
      I am trying to convert a custom web publishing site in php, from FM Server 12 to FM Server 15.    We've updated the Windows machine that hosts it (to a shared server on the recommendation of IT) and installed FM Server 15.  
      Direct opening of the existing scripts always yields 0 results, though the database hasn't changed.  
      Is there some setting, somewhere, that I am oblivious to?   I've consulted user's manuals, IIS settings, web postings, ...
      Attached is a copy of the website I am running.
      I can point you to the existing website, though I doubt it would be useful.  The beginning part of this website are script tracking errors.  I've been inserting them, trying to track down where this error is creeping up.  So please ignore.
      Please ask any additional questions, I am sure there are many.
      Cheers,
      Tony
       
       
      PublicPortal.zip
  • Who Viewed the Topic

    1 member has viewed this topic:
    hutchlad 
×

Important Information

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