Hi
When I call a user defined form I pass a variable in the URL www.blah.com/contactform?mfid=4
I want to use this variable within the UserDefinedForm.php to enable me to change what attachment gets sent with the response to the submitter i.e. want to add this (at about line 400)
$fn = DataObject::get_by_id("MonkeysFist", $_GET['mfid']);
if(!$fn) return false;
$filepath = "assets/Uploads/mf_attachments/$fn->MFFileName";
$emailToSubmiter->attachFile($filepath, $fn->MFFileName);
At the moment $_GET['mfid'] returns no value and I am wondering how I can pass it into this script?
I know I should not be necessarily adding it to this file as it would become an upgrade issue but I am no worrying about that at the moment. I just want to see if I can get it to work.
How do I go about this?
Thanks
MM