Sunday, 15 March 2015

php - How to reach a GET parameter in configuration of form? -



php - How to reach a GET parameter in configuration of form? -

i'm in middle of configure() method , must set default selected value combobox. value in url, no request or object.

how reach variable?

not thought utilize sfcontext in context.

better send parameter in constructor of form. this:

$form = new form(array(), array(‘my_form_param’ => $request->getparameter('my_get_param'));

in form can phone call with:

$this->getoption('my_form_param')

php symfony-1.4 symfony-forms

No comments:

Post a Comment