• 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: [Solved] Filling hidden fields with PHP

[Solved] Filling hidden fields with PHP 15 years 6 months ago #4827

Hello,

In my form, I have defined two hidden input fields without a default value. Upon opening the form I would like to insert some dynamic data via PHP into these fields but unfortunately, I don't know how to do that.

Can anybody help me?

Thanks,
Robert

Solved the issue by doing some more searching :) Use the following code:

if(isset($_POST))
{
$_POST = date(\"d.m.Y\");
}

Where 'date' is the name of the hidden input field.<br><br>Post edited by: robert.strauch, at: 2008/09/25 10:34
The administrator has disabled public write access.

Re:[Solved] Filling hidden fields with PHP 15 years 6 months ago #4831

  • nettemor
  • nettemor's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 33
Thanks for sharing, i also needed this one :-)
The administrator has disabled public write access.

Re:[Solved] Filling hidden fields with PHP 15 years 5 months ago #5324

  • Serr.biz
  • Serr.biz's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
I want to capture the referring URL and put it in the hidden field. The tech notes say to use this, but it doesn't work. Thoughts?

//<code>

return $_SERVER;

//</code>
The administrator has disabled public write access.

Re:[Solved] Filling hidden fields with PHP 15 years 5 months ago #5328

  • dragonjc
  • dragonjc's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 151
Component RS SHow Form in build
The administrator has disabled public write access.

Re:[Solved] Filling hidden fields with PHP 15 years 5 months ago #5346

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

The //<code> tag works only for RSform! Pro.
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: [Solved] Filling hidden fields with PHP 12 years 1 month ago #16604

  • gburdett
  • gburdett's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
I have found this hack that might help. I want the page the form was sent from. I am using a hidden field named "page". I am changing the value using PHP and jQuery in the main template file.


<script type="text/javascript" >
$(document).ready(function() {
var text = "<?php echo $_SERVER;?>";
$("input#page").val(text);
});
</script>


This changes out the value of the form field so when it is submitted, the value is correct.
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!