Unfortunately, the username and password you have entered do not match!

Registration

Unfortunately, this username is already taken!

Unfortunately, this e-mail address is already used!

Please retype the verification code.

All fields are required

Capturing referring URL

Welcome, Guest
Username Password: Remember me

Capturing referring URL
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Capturing referring URL

Capturing referring URL 1 year, 6 months ago #11011

I feel a bit silly asking this, especially as it's specifically documented here(www.rsjoomla.com/customer-support/docume...he-referer-page.html). I upgraded to Pro thinking it was necessary to do this, but am now not sure as it still doesn't work for me.

All I want to do is capture the referring URL that lead the user to the form and pass it through in a hidden field. Is that possible in RSForm, and how? I've tried entering the following in the on-submission-scripts field, where 'ref' is the name of my hidden field, which has no default value. The variable 'ref' is coming through empty.:

 
if(isset($_POST['form']))
{
$_POST['form']['ref'] = $_SERVER['HTTP_REFERER'];
}

Re:Capturing referring URL 1 year, 6 months ago #11058

hiiiii



All I want to do is capture the referring URL that lead the user to the form and pass it through in a hidden field. Is that possible in RSForm, and how? I've tried entering the following in the on-submission-scripts field, where 'ref' is the name of my hidden field, which has no default value. The variable 'ref' is coming through empty.:


________________________
Want to get-on Google's first page and loads of traffic to your website? Hire a SEO Specialist from Ocean Groups  seo pecialist

Re:Capturing referring URL 1 year, 6 months ago #11067

  • alexp
  • OFFLINE
  • Moderator
  • Posts: 1047
Hello,

The code mentioned in the documentation is available for RSform!Pro, not RSform!. Please note that scripts are not compatible.

You could try something like this instead (placed in the Scripts called on form display area):

 
foreach($fields as $i=>$field){
if($field->name == 'ref')
$fields[$i]->default_value = $_SERVER['HTTP_REFERER'];
}
 
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team

Re:Capturing referring URL 6 hours, 1 minute ago #0

Hello,
This is an automatically generated message.
We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you wish to receive our support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here: http://www.rsjoomla.com/support-policy.html.

Thank You!
PLEASE NOTE: This topic is NOT locked and you can add replies to it. Other users are free to reply as well. This message has been generated by a bot and has no effect on the topic whatsoever.
  • Page:
  • 1
Moderators: alex, alexp, octavian, bogdanc, andreic
Time to create page: 0.68 seconds
Feedback