• 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: Prefill a hidden field based on article

Prefill a hidden field based on article 15 years 6 months ago #5464

  • masgian
  • masgian's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 12
I use RSForm pro.

I search a way to prefill a hidden field with something that will tell which article is coming the form from (let's say Article title). I want to use a form in several articles. I could use several forms, but that process could be tedious and since forms are the same, I wish I could use one which will tell me also which article is coming from.

Is there any way for this?

Thanks in advance
Michael
The administrator has disabled public write access.

Re:Prefill a hidden field based on article 15 years 6 months ago #5552

  • octavian
  • octavian's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 783
  • Thank you received: 110
Hello,

You could use this code snippet in the default value of the field:

//<code> $isHTTPS = (isset($_SERVER[\"HTTPS\"]) && $_SERVER[\"HTTPS\"] == \"on\"[code]
//<code>
$isHTTPS = (isset($_SERVER[\"HTTPS\"]) && $_SERVER[\"HTTPS\"] == \"on\"
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.

Prefill a hidden field based variable values 15 years 5 months ago #5727

  • foxpyt
  • foxpyt's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
Hi

I am using RSFormPro and have a similiar need:

I would like to set a select list with a defaut value which depends on the referring page.

From about 20 different articles there is a link to the form. I want to set the defaut value depending on the referring article.

Is it possible to use something like

$defautvalue = $_GET[\"hotelname\"];

for a select list? (or with $ _POST)

Thanks a lot

Fox
The administrator has disabled public write access.

Re:Prefill a hidden field based on article 15 years 5 months ago #5806

  • masgian
  • masgian's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 12
Works! thanks alot!
The administrator has disabled public write access.

Re:Prefill a hidden field based on article 12 years 7 months ago #14868

  • david31
  • david31's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 12
I tried this and it did not work... Maybe my requirement is slightly different?

I need a text field to appear as an editable box with the article title prefilled in it...
The administrator has disabled public write access.

Re: Prefill a hidden field based on article 12 years 7 months ago #15032

I have exactly the same requirement; several articles using a single form.

I put the suggested code in the default value of the hidden field. However, the resulting admin email displayed exactly that code, not the name of the article.

I am rather new to RSForm and really do not understand what the code is supposed to do; especially the use of HTTPS instead of HTTP.

Please give me some advice to get me off of dead center!

Thanks you very much.

Don

The name of the article can be captured for the email using the code at:
www.rsjoomla.com/support/documentation/v...-the-page-title.html

Happy days are here again!
Last Edit: 12 years 7 months ago by woodworker. Reason: Found my answer
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!