I finally get it works with this:
$this-filter = new
BirthdayFormFilter(array('name'=array('text'='Peter')));
Javi
On 02/16/2010 05:35 PM, Javier Garcia wrote:
I give you more code: I have this code below in the index template.
The filter form (without Peter as default value, of course..)
Hi,
i have tried this:
$this-filter = new BirthdayFormFilter();
$this-filter-setDefault('name', 'Peter');
and this:
$a = array('name' ='Peter');
$this-filter = new BirthdayFormFilter($a);
but they didn't work...
I forgot to say i want to give the default value
Hello,
What is the error?
Have you cleared your navigation history/cache ? ( firefox seems to
keep the selected values... )
On 16 fév, 13:42, Javier Garcia tirengar...@gmail.com wrote:
Hi,
i have tried this:
$this-filter = new BirthdayFormFilter();
Is a problem to set this default filter value in the
profilesGeneratorConfiguration class? ... create a method
getFilterDefaults() and return an array with default filter values.
Or you need to set this in the action?
On 16 ún, 13:42, Javier Garcia tirengar...@gmail.com wrote:
Hi,
i have
On 02/16/2010 04:19 PM, Florian wrote:
What is the error?
Have you cleared your navigation history/cache ? ( firefox seems to
keep the selected values... )
Yes, i cleared it but the default value is not showed..
There isn't any error.
--
You received this message because you are
On 02/16/2010 04:26 PM, Tom Ptacnik wrote:
Or you need to set this in the action?
Yes, i need to set this in the action.
--
You received this message because you are subscribed to the Google Groups symfony
users group.
To post to this group, send email to symfony-us...@googlegroups.com.
To
I give you more code: I have this code below in the index template. The
filter form (without Peter as default value, of course..) and Peter
are showed.
?php use_helper('Form'); ?.
?php echo form_tag('birthday/filtrar') ?
?php echo $filter; ?
div?php echo submit_tag('Filter') ?/div
/form
Hello,
To my mind, you should use this method:
{{{
$this-filter-setDefault('name', 'Peter');
}}}
It's more correct, because semantically, you want set a default value
to your form, not to your model object!
But if you want to set use the contructor of the sfFormFilter
BaseForm