Forums

locate the url where you put in the form

riga75 14 Apr, 2013
let's see if I can explain my problem, I have about 10 pages where I want to put the form on every page, now I have always worked that I created 10 form with the subject of the email email that I get the title of the page so that could tell which page had been filled in the form, but I was wondering if it was possible to create a single form and make sure that the subject of the email or in the email itself appeared the title or the url of the page.

I hope I explained myself, thanks a lot


Stefano
riga75 18 Apr, 2013

Hi Stefano,

Please see this FAQ

Bob



Thank you Bob, but I did not understand, I have created a custom form and not wizard, how do I create a field that tell me?
thanks
GreyHead 18 Apr, 2013
Hi Stefano,

Then you add the code to the your Custom Code HTML, it should still work OK there.

Bob
riga75 18 Apr, 2013
It does not work, look at the screenshots and you see where I went wrong.
thanks a lot

stefano

[attachment=1]Schermata 2013-04-18 alle 16.59.31.png[/attachment]
[attachment=0]Schermata 2013-04-18 alle 16.59.49.png[/attachment]
GreyHead 18 Apr, 2013
Hi Stefan,

You Custom Code is in the OnSubmit event and not in the On Load event.

Bob
riga75 18 Apr, 2013
Done, but in the email that I get there is the title of the page that started the form.
thanks
GreyHead 19 Apr, 2013
Hi riga75,

The FAQ has code for both the title and the URL. You can get either or both of them.

Bob
riga75 19 Apr, 2013
Yes, yes, I knew Bob and I entered as you said but I do not get anything. I do not understand where I'm wrong, I can give you access?
GreyHead 19 Apr, 2013
Hi riga75,

Please see my reply to your other post - the title input is outside the <form> tags so not a part of the form.

Bob
riga75 17 May, 2013
Sorry I'm late, but I did some tests and I can not get it to work could you help me?
thanks a lot

stefano
GreyHead 18 May, 2013
Hi stefano,

What code have you used and what exactly doesn't work?

Bob
riga75 18 May, 2013
In OnLoad I loaded the following code:
<?php
$doc =& JFactory::getDocument();
?>
<input type='hidden' name='page_title' id='page_title' value='<?php echo $doc->getTitle(); ?>' />


but then when I fill out the form in the email that arrives I see the title of the page and the url
What could be wrong?
thanks a lot

stefano
GreyHead 18 May, 2013
Hi Stefano,

Looking back I think that my original suggestion was that you add this to the Form HTML in the Form Code box.

Bob
riga75 18 May, 2013
Thanks bob but I can not understand what you say in the faq, where do I put that code?
I saw that you wrote in another post but I did not understand things you said

thanks a lot

stefano
GreyHead 19 May, 2013
Hi Stefano,

You said that you had created a Custom Form; which I assume means that you have put HTML directly in the Form HTML box on the Form Code tab. Please try putting this code in the same place as your Form HTML.

Bob
riga75 20 May, 2013
Great, now it works, thanks a lot

stefano
This topic is locked and no more replies can be posted.