• 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: How do I pass a parameter within an article

How do I pass a parameter within an article 13 years 4 months ago #12165

  • jdagan
  • jdagan's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
I'm using RSForm Pro on Joomla 1.5 with the content plugin.
I embed forms on content using
{rsform 7}

How do I pass a parameter to the form inside a content.

Thanks,

jdagan
The administrator has disabled public write access.

Re:How do I pass a parameter within an article 13 years 4 months ago #12252

  • bogdanc
  • bogdanc's Avatar
  • OFFLINE
  • Moderator
  • Posts: 669
  • Thank you received: 11
Hello,

This can be achieved in RSForm! Pro, using a script similar to the one presented here:

www.rsjoomla.com/customer-support/docume...can-i-catch-it-.html

however, instead of catching the parameter using PHP you will have to use a Javascript function in the article in order to achieve this.
The administrator has disabled public write access.

Re:How do I pass a parameter within an article 12 years 10 months ago #13989

  • rblum
  • rblum's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
bogdanc,

I am trying to do exactly what you describe but failing. Do you have a sample of the Javascript you mentioned?

Thanks,
-Rob
The administrator has disabled public write access.

Re:How do I pass a parameter within an article 12 years 10 months ago #14052

  • andreic
  • andreic's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 722
  • Thank you received: 59
Hello,

Please try using:
<script type="text/javascript">
function gup( myparameter )
{
  myparameter = myparameter.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+myparameter+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    document.getElementById('field_name').value = "No value";
  else
    document.getElementById('field_name').value = results[1];
}
 
window.addEvent('domready', function() {
 
gup( 'myparameter' );
 
});
</script>
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.
  • 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!