Hi!! Did you find some way to solve your problem?
On 8 sep, 12:38, Stefano <[email protected]> wrote: > Hi, to all. > > I'm customizing an Admin generated FormFilter with a Date Range. > > I redefined the widget using two sfWidgetFormFilterInput for the > "from" and "to" fields, since I don't like the standard widgets used > for month, day and year. > > It works, but when the page with the filtered records is displayed the > "from" and "to" fields are empty, so the User has no visual feedback > of the applied filter. > > How can I retrieve the value and set it again before the form is > redisplayed? > > TIA > > Stefano > > class ListinoFormFilter extends BaseListinoFormFilter > { > public function configure() > { > parent::setup(); > > $this->widgetSchema['DataInizioValidita'] = new > sfWidgetFormFilterDate(array('from_date' => new > sfWidgetFormFilterInput(array('with_empty' => false), > > array('size' => 10, 'maxlength' => 10, > > 'class' => 'campoData')), > > 'to_date' => new sfWidgetFormFilterInput(array('with_empty' => > false), > > array('size' => 10, 'maxlength' => 10, > > 'class' => 'campoData')), > > 'with_empty' => false)); > > $this->validatorSchema['DataInizioValidita'] = new > sfValidatorDateRange(array('from_date' => new ssValidatorDate(array > ('date_format' => '/^\d\d?-\d\d?-\d\d\d\d$/', > > 'required' => false), > > array('bad_format' => 'La data deve essere indicata come gg-mm-aaaa.', > > 'invalid' => 'Data errata.')), > > 'to_date' => new ssValidatorDate(array('date_format' => '/^\d\d?-\d > \d?-\d\d\d\d$/', > > 'required' => false), > > array('bad_format' => 'La data deve essere indicata come gg-mm-aaaa.', > > 'invalid' => 'Data errata.'))), > > array('invalid' => 'La data iniziale deve essere antecedente alla data > finale.')); > > } > > } --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
