• 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: One form, Many Origins. How do I know where?

One form, Many Origins. How do I know where? 12 years 10 months ago #17629

  • robcoyle
  • robcoyle's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
Hi Guys,
I have a question about the possibility of a form, when submitted, also submitting it "origin".

I want to add an "expression of interest" form to multiple courses on my training related website. Either the form will be embedded in the Article using a plugin or ill just link to the form.

Is there I way I can use only one form for all courses and for RSFormPro to send along with the email submission the origin of the form... so I know what course they are expressing interest in? This would save me having to make a dropdown on the form listing all the courses?

I did do a good google and search on the forum but didnt find a conversation about this.

Thanks for your help
The administrator has disabled public write access.

Re: One form, Many Origins. How do I know where? 12 years 10 months ago #17630

Check this forum post to see if it will do what you are requesting.
www.rsjoomla.com/forum/37-rsform-pro/146...ubmission.html#14633
The administrator has disabled public write access.

Re: One form, Many Origins. How do I know where? 12 years 10 months ago #17635

  • robcoyle
  • robcoyle's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
Hi Kathy,

Thanks for the advice!

However I just discovered that the Module to publish a form in any position (which i also need to do this task) is only for Joomla 1.5! Disaster. Im on Joomla 2.5 :(
The administrator has disabled public write access.

Re: One form, Many Origins. How do I know where? 12 years 10 months ago #17636

Try submitting a ticket to support on your issue. They may have a solution for that already. And then please share it on the forum. It's very helpful when we get shared info from users who get answers from support.
(Remember they work Mon-Fri so it may be a few hours before you get an answer)

Good luck,
K
The administrator has disabled public write access.

Re: One form, Many Origins. How do I know where? 12 years 10 months ago #17653

  • Roux
  • Roux's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
I get the menu alias (assuming you use them) and then store it in a hidden field. In the hidden field default value put the following code:

//<code>
$menu = JSite::getMenu();
$alias = $menu->getActive()->alias;
return $alias;
//</code>

Then on submission your form should hold the menu alias the form was submitted from.

Hope this helps.
P
The administrator has disabled public write access.

Re: One form, Many Origins. How do I know where? 12 years 10 months ago #17687

  • robcoyle
  • robcoyle's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
Uff.. ive had no luck in the end... im on J2.5... and tried the following combinations:

1
$menu = JSite::getMenu();
$alias = $menu->getActive()->alias;
return $alias;
2
$app = JFactory::getApplication();
$menu = $app->getMenu();
return $menu;
3
$menu = &JSite::getMenu(); // get JMenu object
$active = $menu->getActive(); // get active menu
return $active;

And used the following tag in my email: {getURLcode:value}

But im drawing a blank. Hmmm
The administrator has disabled public write access.

Re: One form, Many Origins. How do I know where? 12 years 9 months ago #17934

Hello,

It took me a while to find it out again for Joomla! 2.5 instead of 1.5 but here is the code to get the id.
This works when people opens a link.
//<code>
$app = JFactory::getApplication();
$menu = $app->getMenu();
$active = $menu->getActive();
$menuid = $active->id;
return $menuid;
//</code>
id = menu id
alias = menu alias
titel = menu title

When you search further and play with it you get this code.
This will generate a full URL with article id and menu id.
//<code>
$app = JFactory::getApplication();
$menu = $app->getMenu();
$active = $menu->getActive();
$menuid = $active->id;
 
$menulink1 = 'index.php?option=com_content&view=article&id=';
$menulink2 = '&Itemid=';
 
$article = JRequest::getVar('view');
$articleid = (int)JRequest::getVar('id');
 
$getUrlCode = $menulink1 . $articleid . $menulink2 . $menuid;
 
return $getUrlCode;
//</code>

Keep in mind this only works in a Article with a embedded form.
Regards
Wilco Alsemgeest

Please note: my help is not official customer support. To receive your support, submit a ticket by clicking www.rsjoomla.com/my-support-tickets.html
The administrator has disabled public write access.

Re: One form, Many Origins. How do I know where? 12 years 9 months ago #17941

  • alexp
  • alexp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 2253
  • Thank you received: 180
Hello,

Simpler method:
//<code>
return RSFormProHelper::getURL();
//</code>
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.

Re: One form, Many Origins. How do I know where? 11 years 4 months ago #25817

Is there also a method to get the article title into a form field?

In joomla 1.5 this worked fine with the following code:
//<code>
$doc = JFactory::getDocument();
return $doc->getTitle();
//</code>

In joomla 2.5 this doesn't work anymore?
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!