Jump to:

11003 Posts in 2735 Topics by 1824 members

All other Modules

SilverStripe Forums » All other Modules » Get referrer from UserForms?

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1236 Views
  • suntrop
    Community Member
    131 Posts

    Get referrer from UserForms? Link to this post

    UserForms saves the 'referrer' as a hidden text field. Is it possible to get this into the mail?

  • Willr
    Forum Moderator
    5511 Posts

    Re: Get referrer from UserForms? Link to this post

    Not easily in the module. You would have to edit the core UserDefinedForm.php file and add a line around 569 to add the referrer to the list

    // new code
    $referrer = new SubmittedFormField();
    $referrer->Name = "Referrer";
    $referrer->Title = "Referrer";
    $referrer->Value = urlencode($data['Referrer']);


    // existing code
    $emailData = array(
       "Sender" => Member::currentUser(),
       "Fields" => $submittedFields

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.