• 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: Get title in form from referring article

Get title in form from referring article 9 years 1 month ago #34539

  • jobgerl
  • jobgerl's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 1
Hi,

This one puzzles me now for a while and I can't get it solved. Maybe someone can help.

I have a website with multiple trainings on offer. Everytime someone is interested and wants more information, he/she can fill out an information form.

This form is reached via a link from the training page to a RS Form (the form is not embedded into the training page, but stand alone). I like the title of the referring page (the training page) automatic loaded into a form field (visible to the applicant).

But I can't get it to work. I managed to get the page name and url of the form into a field. But not the title of the referring page. Does anyone know how I can get this to work?
The administrator has disabled public write access.

Get title in form from referring article >solved 9 years 1 month ago #34548

  • jobgerl
  • jobgerl's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 1
I got help from the RS Joomla team.
You can find help here: www.rsjoomla.com/support/documentation/r...he-referer-page.html

And if you want to add content into the form via a referal link on your website? Than use the following page for tutorials:
www.rsjoomla.com/support/documentation/r...=rsformpro-passvalue
The administrator has disabled public write access.
The following user(s) said Thank You: 4c2d63f1aca5590cf2bb63c703390261

Get title in form from referring article >solved 9 years 1 month ago #34560

  • info0207
  • info0207's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 6
Another way would be to use a custom module on the content's page. In that module you generate a link and add get the current page's title/url/whatever. (You could use NoNumbers Sourcerer to get this value.)

You could use this PHP snippet:
<?php
$input = JFactory::getApplication()->input;
$id = $input->getInt('id'); //get the article ID
$article = JTable::getInstance('content');
$article->load($id);
$referertitle = $article->get('title'); // display the article title
?>

You then use this value as the form's field's value in the href's URL that links to the form.
<?php 
echo JRoute::_("http://www.mywebsite.com/index.php?option=com_rsform&formId=1&form[referertitle]=".$referertitle);
?>
Last Edit: 9 years 1 month ago by info0207.
The administrator has disabled public write access.

Get title in form from referring article in a mod 8 years 10 months ago #35197

  • shlomi
  • shlomi's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
How can i get the title and url inside a form as a hidden field.
without using the form link.
i embeded this code in another module on a page.
The administrator has disabled public write access.

Get title in form from referring article in a mod 8 years 9 months ago #35543

  • info0207
  • info0207's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 6
I'm not sure if I understand you correctly shlomi. Could you give some more information about your use case?

I don't think it is possible to get the refering page's title and url in a hidden field withouth adding it to the querystring
Last Edit: 8 years 9 months ago by info0207.
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!