I found the problem after 2 days of thinking.
use this line to start the script.:
# perl formscript.pl sample
(I was doing sample.text)
if you copy and paste commands from READ inside formmaker :
Perl formscript.pl [filename]
then make sure it is: perl not Perl
and
./formscript.pl [filename]
filename (no extension e.g filename.txt or else )
good luck to others
more clarifications:
I saved the template sample inside the same directory location of formscript.pl and kept the ‘sample’ file without extension (removed the .text
and then run : # perl formscript.pl sample
I recently figured out the report format: in order to have a report printed in one column, just add a line in report.php, at the beginning:
<?php
//------------report.php
include_once("…/…/globals.php");
include_once($GLOBALS["srcdir"]."/api.inc");
function pain_history_test3__report( $pid, $encounter, $cols, $id) {
$cols = 1; <===this is the line I added
$count = 0;
…
I still can not include the HTML headers for each data section. Any help is appreciated!
Thank you for the fix for columns. This would be easy to add to formscript.pl. Fixing it to include extra html from the template in report.php will be a little more involved. It hadn’t occurred to me that this would be needed. I’ll look into it.
If you don’t include extra html in your template, like headers, you can make your elements in new.php line up more nicely with the command line option to formscript.pl --bigtable. --bigtable ignores any additional html between fields and puts all fields into one big table instead of individual tables.
Omar:
Thank you for clarification. Sorry about any confusion. The documentation and sample template in formmaker directory are very out of date. The formscript.pl program is completely self-contained. If you run it without an argument, it generates the most current documentation at the command line and creates the most current version of a sample template file in the current working directory. You are correct that the template needs to be in the current directory.