• 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: "hidden field" value as variable value in PHP

"hidden field" value as variable value in PHP 11 years 5 months ago #25514

  • lking
  • lking's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 24
Hello,

As the subject mentioned, how do we set the hidden field value as the variable value in php script? Just say I have a hidden field named "hdata" and a variable named $datatest in php script panel and $datatest. I wanted the hidden field value to be the $datatest value. So how do we get this?

I tried adding the following codes in the value box of hdata hidden field but it doesn't work..
//<code>
$hdata = $_POST;
//</code>

and also:
//<code>
$hdata = $datatest;
//</code>

Please help...

Thanks..
Last Edit: 11 years 5 months ago by lking.
The administrator has disabled public write access.

"hidden field" value as variable value in PHP 11 years 5 months ago #25515

  • lking
  • lking's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 24
To simplify this, I would like to set the default value of the hidden field as the value of a variable as declared in php script panel.

For example: In php script panel, I have a variable $datatest="123123"; and would like to set the hidden field value named: hdata to be exactly the same as $datatest value and most IMPORTANTLY, when the form is processing or during the time while sending the data, I want the value of the hidden field to show up while posting the form.

I tried many different ways but it only be able to change the data in the email but it won't show data while sending the form. *using firebug to capture the form data.

Please help...
Last Edit: 11 years 5 months ago by lking.
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!