Re: [symfony-users] Re: [Symfony 2] Adding custom labels to form fields

2011-02-28 Thread oscar balladares
In that case, I totally agree!  [?]

2011/2/28 Christophe COEVOET 

>  Le 28/02/2011 04:38, oscar balladares a écrit :
>
> The current way is fine for me. I think Labels should go on the View, and
> be references through the corresponding field's name. Setting the label
> inside the Form component is what I hated about Symfony 1.x.
>
>  Lets say the layout desinger tell us that a label like a "UserName"
> (binded to a field named "username") is not quite nice to the enduser
> so he just would change the label in the View to "provide a username to
> login";  the programmer will do not have aditional work changing the Form
> code.
>
>  Labels conserns to creativity and they are subjective, and can be
> anything.
>
>  That is, no doubt about it, my personal opinion [?]
>
> I agree that the designer should be able to set the label, and the new
> proposal does not remove this. But setting the labal in the code can also be
> useful in some cases. So th ebest solution is to support both cases.
>
> --
> Christophe | Stof
>
>  --
> 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 symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
<<1E3.gif>><<360.gif>>

Re: [symfony-users] Re: [Symfony 2] Adding custom labels to form fields

2011-02-28 Thread Christophe COEVOET

Le 28/02/2011 04:38, oscar balladares a écrit :
The current way is fine for me. I think Labels should go on the View, 
and be references through the corresponding field's name. Setting the 
label inside the Form component is what I hated about Symfony 1.x.


Lets say the layout desinger tell us that a label like a "UserName" 
(binded to a field named "username") is not quite nice to the enduser
so he just would change the label in the View to "provide a username 
to login";  the programmer will do not have aditional work changing 
the Form code.


Labels conserns to creativity and they are subjective, and can be 
anything.


That is, no doubt about it, my personal opinion
I agree that the designer should be able to set the label, and the new 
proposal does not remove this. But setting the labal in the code can 
also be useful in some cases. So th ebest solution is to support both cases.


--
Christophe | Stof

--
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
<>

Re: [symfony-users] Re: [Symfony 2] Adding custom labels to form fields

2011-02-27 Thread oscar balladares
The current way is fine for me. I think Labels should go on the View, and be
references through the corresponding field's name. Setting the label inside
the Form component is what I hated about Symfony 1.x.

Lets say the layout desinger tell us that a label like a "UserName" (binded
to a field named "username") is not quite nice to the enduser
so he just would change the label in the View to "provide a username to
login";  the programmer will do not have aditional work changing the Form
code.

Labels conserns to creativity and they are subjective, and can be anything.

That is, no doubt about it, my personal opinion [?]



2011/2/27 Christophe COEVOET 

> Le 27/02/2011 21:03, Justin Fortier a écrit :
>
>  I too found form labels counter intuitive. It would seem it should be
>> easy to override the default label by passing in the option 'label'.
>> Perhaps I'll fork symfony2 implement the changes and do a pull request.
>>
> There is currently a proposal to rewrite entirely the Form component and
> the new version allows to set the label. But it is not merged in the main
> repo yet.
>
> Regards
>
> --
> Christophe | Stof
>
>
> --
> 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 symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
<<360.gif>>

Re: [symfony-users] Re: [Symfony 2] Adding custom labels to form fields

2011-02-27 Thread Christophe COEVOET

Le 27/02/2011 21:03, Justin Fortier a écrit :

I too found form labels counter intuitive. It would seem it should be
easy to override the default label by passing in the option 'label'.
Perhaps I'll fork symfony2 implement the changes and do a pull request.
There is currently a proposal to rewrite entirely the Form component and 
the new version allows to set the label. But it is not merged in the 
main repo yet.


Regards

--
Christophe | Stof

--
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: [Symfony 2] Adding custom labels to form fields

2011-02-27 Thread Justin Fortier
I too found form labels counter intuitive. It would seem it should be
easy to override the default label by passing in the option 'label'.
Perhaps I'll fork symfony2 implement the changes and do a pull request.

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: [Symfony 2] Adding custom labels to form fields

2011-02-26 Thread oscar balladares
It was actually easy. I also wanted to create custom labels from inside the
Form Class. Lol
Thanks for tha' tip.

2011/2/26 Jan Eichhorn 

> Hi,
> thanks for your help.
> Thats actually helps a lot.
>
> Greets Jan
>
> --
> 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 symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: [Symfony 2] Adding custom labels to form fields

2011-02-26 Thread Jan Eichhorn
Hi,
thanks for your help.
Thats actually helps a lot.

Greets Jan

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: [Symfony 2] Adding custom labels to form fields

2011-02-25 Thread jdewit
Those options are not available in the field class. Open 
Symfony\Component\Form\Field to see which ones are. 

Just customise the label in the view layer.

form.twig.html
Title:
{{ form_field(customerForm.title, { 'class': 'capitalize', 'maxlength': '2' 
}) }}

-- 
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 symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en