I'm sorry, I didn't get you had to get this in a form.
As you are probably creating the form in an action you can add a
parameter to the form constrictor where you'll pass the value and set
it to the hidden field.
e.g.
in the action
$hidden_value = $this->getRequestParameter('paramentername');
$this->form = new MyForm($hidden_value);
in the form
...
__construct($hidden_value, $defaults = array(), $options = array(),
$CSRFSecret = null) {
parent::__construct($defaults, $options, $CSRFSecret);
$this->hidden_value = $hidden_value;
}
public function configure() {
// set the input widget value with $this->hidden_value
}
Martino
On Wed, Feb 18, 2009 at 6:41 PM, ckemmler <[email protected]> wrote:
>
> Nope. That, unfortunately doesn't work. I'm told the forms framework
> is a recent addition, and it doesn't behave as the other parts of the
> Symfony...
>
> On Feb 18, 6:12 pm, Martino Piccinato <[email protected]> wrote:
>> $this->getRequestParameter('paramentername');
>>
>> On Wed, Feb 18, 2009 at 6:01 PM, ckemmler <[email protected]> wrote:
>>
>> > Hi,
>>
>> > I need to get a parameter from the request to inject it to a hidden
>> > field using the forms framework. Is is possible to use something else
>> > then $_GET?
>>
>> > Thanks in advance,
>>
>> > Candide
>>
>> > PS: this is a reformulation of my request about the tutorial being
>> > possibly broken - see my former post
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---