Title article in form submit

ertos982 14 Oct, 2012
hello

I have a class with motions articles (50-60), I use a small form within articles and use the following code:

{chronoforms}prenota{/chronoforms}
The form is already created and is the same for all items.

Each item must have a form that sends data in email with the article title.
I have to create 50 form or just create only one?
ertos982 14 Oct, 2012
Thank you Greyhead

I don't understand

Where is this page?
<?php
$doc =& JFactory::getDocument();
?>
<input type='hidden' name='page_title' id='page_title' value='<?php echo $doc->getTitle(); ?>' />
GreyHead 14 Oct, 2012
Hi ertos982,

From the FAQ:

add a Custom Element from the Advanced Elements Group to the Preview box and put this code into it:


Bob
ertos982 14 Oct, 2012
Thank you but i don't understand

View image

I put this code
<input type='hidden' name='page_url' id='page_url' value='<?php echo JURI::current(); ?>' />

in page code chronoform.
-----------------------------
Where should I put this code?

<?php
$doc =& JFactory::getDocument();
?>
<input type='hidden' name='page_title' id='page_title' value='<?php echo $doc->getTitle(); ?>' />

---------------------------

I don't understand
GreyHead 15 Oct, 2012
Hi ertos982,

If you are using the Custom mode instead of Wizard mode then you won't see the Preview window where the Custom element is.

You can add the same code directly into the Form code box.

Bob
ertos982 18 Oct, 2012
I don't understand
I have thiis problem, there is a solution Yes or NO?

Thank you
GreyHead 18 Oct, 2012
Hi ertos982,

You can add the same code directly into the Form code box.



Bob
ertos982 19 Oct, 2012
Thank you
I put the code in the box code (VIEW IMAGE 01.jpg

Why you can not see the page site? (VIEW IMAGE 02.jpg

Can I send the login and password administrator in message private?

Thank you
GreyHead 20 Oct, 2012
Hi ertos982,

As you can see from your image the code is working OK in your form HTML and returns the title correctly when the form is submitted.

Bob

PS It looks as though one image is missing from your post.

PPS Your form HTML has several widht= typos in it but I don't' think they cause any serious problems.
ertos982 20 Oct, 2012
The code does not work
I have a category called Restaurant
Within this category there are 50-60 items (Restaurant alpha - Beta restaurant etc)

Each article I have inserted the form
Each article I have inserted the form but the title of the page should not be EATING but the title of the page should be the name of the restaurant, so I understand which restaurant is the reservation

Can i help me?
I send administrator login in private message with the url site

Thank you
GreyHead 20 Oct, 2012
Hi ertos982,

As you can see I've logged on and looked and the form is correctly showing the page title.

It looks as though you need to change the Joomla! settings so that the article title id shown as the page title instead of the category title at present. I'm not sure how to do that but I'm sure it's in the Joomla! docs somewhere.

Bob
ertos982 20 Oct, 2012
Hi grey

Thank you but i have error

VIEW IMAGE 01.jpg

The tile page is TEST, but the value form in DOVE MANGIARE

This is the error
GreyHead 20 Oct, 2012
Hi ertos982,

I can hardly see the image and you appear to have blanked out anything that would give me any clue about which page you are looking at :-(

The code you have will pick up the Joomla! setting for the page title when the form is loaded. Do you have some other plug-in managing the title that could be running after the ChronoForms plug-in?

If you do then try changing the plug-in order.

Otherwise perhaps the next thing to try is to get the value of the <title> tag using JavaScript.

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