Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

Hello,

I am working with a PHP application that submits forms to Fielmaker. Is there a way for every new form or record to be automatically printed as soon as they are submitted?

Thanks

Posted

One method is by running an FM Script. (This is if you want to print from an FM Layout.)

Here is a php script which "run" an FM Script:

<?php



	$result = file_get_contents("http://localhost:591/FMPro?-db=combotest.fp5&-format=-fmp_xml&name=owen&-script=test&-find");

	if ($result==0)

		{ echo "Yahoo!!!";}

	else

		{ echo "Not OK";};

		

?>

All the best.

Garry

Posted

Garry,

By printing I meant sending the just created record to the printer and automatically printing it out.

Thanks.

P.S. I'm using the FX module to connect to FM.

Posted

I do not use FX, however here is a PHP method which calls a Script:

$args = "";

while ($fm_params = Current($_REQUEST))

   {

   $args .= urlencode(key($_REQUEST)) . "=" . urlencode($fm_params) . "&";

   next($_REQUEST);

   };

@include("http://localhost:591/FMPro?" . $args);

?>


You could use a Form like this:


<body>

Hello World<br>

<form action="fmpro.php" method="POST">

<input type="hidden" name="-db" value="combotest.fp5">

<input type="hidden" name="-format" value="-fmp_xml">

<input type="hidden" name="-script" value="printrec">

fields go here.......

<input type="submit" name="-new" value="New Rec">

</form></body>

Good Luck with the FX version.

Garry

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