This topic is locked

Pre-populate add record page from URL

12/13/2009 5:23:51 PM
PHPRunner General questions
S
seanduffy author

Hi,

I want to parse data for certain fields so it pre-populates the add record page when they click the add record link.
Would prefer to put this into the URL as a query string.
E.G. myscript_add.php?field1=abc&field2=def so these boxes on the add page are pre-filled.
I have this working where clicking on the link adds the record and then re-directs to a specified page but on this occasion I want to give users the ability to edit the record before saving.
Any help would be appreciated.

J
Jane 12/14/2009

Hi,
checl URL parameters in the Add page: Before process event:

if (@$_REQUEST["field1"])

$_SESSION["field1"] = $_REQUEST["field1"];



Then use $_SESSION["field1"] as defaut values on the "Edit as" settingsdialog on the Visual Editor tab.