Your default value should be an option for the widget.
The form (who has the label of the field) would use this label as option
for construction.
protected myForm
{
protected $labels = array(
'my_field' => 'My Field value'
);
public function configure()
{
$this->widgetSchema['my_field'] = new
myWidgetFormInput(array('default_value' => $this->labels['my_field']));
// ...
$this->setLabel('my_field', $this->labels['my_field'];
}
See the idea ?
Le 10/08/10 23:53, Juan Pablo Valois Valencia a écrit :
Hi everybody,
I'm trying to get the text from a drop down list that I have in a
backend form, but I don't know how to get it!
If I put something like $this->getFieldName I get only a number, the
index of the list (array), in the HTML code is the value.
Could someone help me with this? Thanks in advance...
--
Juan Pablo Valois Valencia
Ingeniería de Sistemas y Computación
Universidad Tecnológica de Pereira
Pereira - Risaralda - Colombia
--
If you want to report a vulnerability issue on symfony, please send it
to security at symfony-project.com
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
--
---
Alexandre Salomé - http://alexandre.salome.fr
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
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