To pass empty values to the widgets based on choices is really simple with symfony.
For example, the sfWidgetFormDoctrineChoice
accepts a with_empty
option, which can be a boolean or a string:
1 2 3 |
|
which renders the empty option according to the following rules:
1 2 3 4 |
|
The other widget I was working on, sfWidgetFormI18nDate
, accepts an array to configure empty options:
1 2 3 |
|
with the following format:
1 2 3 4 |
|
and the rendered form is something like this: