This topic is locked

Pass parameters to add record form

9/27/2009 8:30:24 AM
PHPRunner General questions
jpedwardspost author

Hi,
I would like to call a phprunner url for adding a new record but additionally I would like to pass some parameters to the add record form that are then loaded into those fields
e.g.
http://www.sendsmsmessages.co.uk/output/un_smsnotes_add.php?sms_tonumber=123456123&sms_fromnumber=8765432176
The above url would load the form for adding a new smsnote and preload the sms_tonumber field with the value (123456123) and preload the sms_fromnumber field with (8765432176).
Is there anyway to achieve this?
Thanks in advance,
JP

J
Jane 9/28/2009

Hi,
save passed values in the session variables in the Add page: Before process event on the Events tab:

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

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


Then use $_SESSION["sms_tonumber"] and $_SESSION["sms_fromnumber"] as default value on the"Edit as" settings dialog on the Visual Editor tab.

jpedwardspost author 9/29/2009

Thanks Jane.
Will be very useful.
Regards,
JP