• 1

Read this first!

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 have an active subscription and wish to receive 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.

Thank you!

TOPIC: Include URL in Form Submission

Include URL in Form Submission 13 years 7 months ago #14633

  • tobypsl
  • tobypsl's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 62
  • Thank you received: 1
Hi

I'd like to use the same form on around 14 different pages on my site, but to know from which page each submission comes from. Using the same form has numerous benefits:

  • I don't have to create 14 different forms
  • It's easy to keep published in a module position by category

The easiest way to do this would seem to be to include the url for the page in the email submitted to admin.

Ideas on how to do this appreciated.

Thanks.
Last Edit: 13 years 7 months ago by tobypsl. Reason: clarity.
The administrator has disabled public write access.

Re: Include URL in Form Submission 13 years 7 months ago #14634

  • bogdan
  • bogdan's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 122
  • Thank you received: 4
Hello,

You can simply add a hidden field component , and in the "Default Value" area you can input this code:
//<code>
$u = RSFormProHelper::getURL();
return $u;
//</code>

This will add the current page.
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here

RSJoomla! Development Team
The administrator has disabled public write access.
The following user(s) said Thank You: khalilan

Re: Include URL in Form Submission 13 years 7 months ago #14646

  • tobypsl
  • tobypsl's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 62
  • Thank you received: 1
Works well thanks Bogdan !
The administrator has disabled public write access.

Re: Include URL in Form Submission 12 years 11 months ago #17223

  • scott0
  • scott0's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
I couldn't get this to work. Have you tried it on Joomla 2.5?
The administrator has disabled public write access.

Re: Include URL in Form Submission 12 years 11 months ago #17371

it works.

you must add the {getURLcode:value} to the send mail so you can read it.
(the getURLcode is my hidden field name. )
The administrator has disabled public write access.

Include URL in Form Submission 11 years 9 months ago #24201

thanks for this - worked a treat.

Do you know if there is a code that will input the intro image of the current article?

Thx
The administrator has disabled public write access.

Re: Include URL in Form Submission 11 years 1 month ago #26781

  • sumstead
  • sumstead's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
I know this is a super-old thread and chances are no one is watching, but I'm having trouble with this one. Doing the code exactly as described, everything works except for once crucial part - the only URL being passed through the form is the URL of the form itself, not the page the person was on when they chose to click the button to fill out a form. Like the OP I have a bunch of pages, each one that has a request button to open up one form for more info, but I want to see what page they were on when they clicked, but all this code seems to do is tell me the form itself.

I get:

Page client was on: domain.com/component/rsform/form/3-quote-request?ml=1

When I'd really like:

Page client was on: domain.com/productpage

-Steve
The administrator has disabled public write access.

Include URL in Form Submission 11 years 1 month ago #26794

  • adrianp
  • adrianp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 631
  • Thank you received: 146
Hello,

If you are opening the form in a modal/pop-up, by inspecting the page's source code of the modal, you will notice that this has its own URL which is different then the one showed in the browser(this is most likely why you are getting another URL).

You can try adding an extra parameter to the URL of your form which you can use to identify from what page the user had accessed your form. Identifying this parameter would basically lead to the page which referred the user to the current page, this way you can differentiate between pages.

More information on how you can pass and catch a parameter can be found here:

www.rsjoomla.com/support/documentation/v...can-i-catch-it-.html
This is not official customer support. To receive your support, submit a support ticket here.
The administrator has disabled public write access.

Include URL in Form Submission 11 years 1 month ago #26808

  • sumstead
  • sumstead's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
Thanks - I think that makes sense, but I'm not sure I can apply it in my case. The link to the form (yes, it's in a modal popup; thanks for the explanation on that!) is in a module, and the module is on multiple pages. I can't change the link in that module to the form for each page, since that same module appears on over 100 different pages. Any way to capture that based on how I have everything set up?

-Steve
Last Edit: 11 years 1 month ago by sumstead.
The administrator has disabled public write access.

Include URL in Form Submission 11 years 1 month ago #26893

  • sumstead
  • sumstead's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
Bump - any suggestions?
The administrator has disabled public write access.

Include URL in Form Submission 11 years 3 weeks ago #27002

  • sumstead
  • sumstead's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
Guess this is a deader. Oh well.
The administrator has disabled public write access.

Include URL in Form Submission 9 years 10 months ago #31363

Sorry to necro this thread but I had exactly this problem. SO FYI To solve this I did ...

Create a new hidden field called refURL (use this to show the referring link (not the current link as this will be the modal box direct form link.))

set the default value of this field to be:
//<code>
return $_SERVER['HTTP_REFERER'];
//</code>
add to your email {refURL:value} and BOOM!

Hope this helps. B)
Last Edit: 9 years 10 months ago by matthew.j.jackson.
The administrator has disabled public write access.
The following user(s) said Thank You: gham

Re: Include URL in Form Submission 9 years 1 month ago #34445

  • jkeenan
  • jkeenan's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
Where is the {URLX:value} inserted?
The administrator has disabled public write access.
  • 1

Read this first!

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 have an active subscription and wish to receive 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.

Thank you!