This topic is locked

How to fill fields

8/7/2006 11:47:10 AM
PHPRunner General questions
F
frank author

Hello,

I have a table view "requests" and count the number of records in "ListPage" Onload and store in $data
With simple "echo $data" I show the value on listview

It shows the correct value in the listview.
Then I will add a new record from this listview "requests" and need to fill the field "NumberOfRecords" with the value $data.
I think the code must be on the AddPage OnLoad.
But how can I put the content of $data into the field "NumberOfRecords"
Thanks for help
Frank

J
Jane 8/8/2006

Frank,
save value $data in the $_SESSION["NumberOfRecords"] variable:

...

echo $data["NumberOfRecords"];

$_SESSION["NumberOfRecords"]=$data["NumberOfRecords"];

...



And then use $_SESSION["NumberOfRecords"] as default value on the Edit format dialog on the Formatting tab.