[symfony-users] Re: Question about choice widget

2010-05-13 Thread Javier Garcia
Thanks Tom. Anyway, I want to add this link below to the links that
you gave in your first post:

http://www.thatsquality.com/articles/7-days-of-symfony-1-1-forms-widgets-and-validators-day7

I find it interesting about formatting forms.

Javi

On May 12, 11:38 am, Tom Ptacnik to...@tomor.cz wrote:
 What about something like
 ul.radio_list li {display: inline}

 On 10 kvě, 15:41, Javier Garcia tirengar...@gmail.com wrote:



  On Mar 29, 3:09 pm, Massimiliano Arione garak...@gmail.com wrote:

   You jsut need to customize your css, forcing your li's as inline.
   No need to modify your template or your formatter.

  I'd like to force the li's as inline as you say, but the generated
  li's don't have the 'id' attribute defined.

  For example, this line li?php echo $form['sexo']-renderLabel() ?/
  li

  generates this:

  li

  label for=usuario_sexoSexo/label

  ul class=radio_list

  li   !-- this li doesn't have any id--

  input type=radio checked=checked id=usuario_sexo_0 value=0
  name=usuario[sexo]nbsp;label for=usuario_sexo_0Chico/label

  /li

  li  !-- this li doesn't have any id--

  input type=radio id=usuario_sexo_1 value=1
  name=usuario[sexo]nbsp;label for=usuario_sexo_1Chica/label

  /li

  /ul

  /li

  Javi

  --

  Symfony 1.3

  --
  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 
  athttp://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 
 athttp://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: Question about choice widget

2010-05-12 Thread Tom Ptacnik
What about something like
ul.radio_list li {display: inline}


On 10 kvě, 15:41, Javier Garcia tirengar...@gmail.com wrote:
 On Mar 29, 3:09 pm, Massimiliano Arione garak...@gmail.com wrote:

  You jsut need to customize your css, forcing your li's as inline.
  No need to modify your template or your formatter.

 I'd like to force the li's as inline as you say, but the generated
 li's don't have the 'id' attribute defined.

 For example, this line li?php echo $form['sexo']-renderLabel() ?/
 li

 generates this:

 li

 label for=usuario_sexoSexo/label

 ul class=radio_list

 li   !-- this li doesn't have any id--

 input type=radio checked=checked id=usuario_sexo_0 value=0
 name=usuario[sexo]nbsp;label for=usuario_sexo_0Chico/label

 /li

 li  !-- this li doesn't have any id--

 input type=radio id=usuario_sexo_1 value=1
 name=usuario[sexo]nbsp;label for=usuario_sexo_1Chica/label

 /li

 /ul

 /li

 Javi

 --

 Symfony 1.3

 --
 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 
 athttp://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: Question about choice widget

2010-05-10 Thread Javier Garcia
On Mar 29, 3:09 pm, Massimiliano Arione garak...@gmail.com wrote:
 You jsut need to customize your css, forcing your li's as inline.
 No need to modify your template or your formatter.

I'd like to force the li's as inline as you say, but the generated
li's don't have the 'id' attribute defined.

For example, this line li?php echo $form['sexo']-renderLabel() ?/
li

generates this:


li

label for=usuario_sexoSexo/label

ul class=radio_list

li   !-- this li doesn't have any id--

input type=radio checked=checked id=usuario_sexo_0 value=0
name=usuario[sexo]nbsp;label for=usuario_sexo_0Chico/label

/li

li  !-- this li doesn't have any id--

input type=radio id=usuario_sexo_1 value=1
name=usuario[sexo]nbsp;label for=usuario_sexo_1Chica/label

/li

/ul

/li


Javi

--

Symfony 1.3

-- 
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: Question about choice widget

2010-03-29 Thread Massimiliano Arione
You jsut need to customize your css, forcing your li's as inline.
No need to modify your template or your formatter.

cheers
Massimiliano

On 25 Mar, 20:03, Javier Garcia tirengar...@gmail.com wrote:
 Hi,

 i have an edit form with a choice widget with radio buttons.

 Symfony renders the options in a column, but I wanted the choices in the
 same line this way:

 Sexo: Chico (o) Chica ()

 So i have modified the code from the line ?php echo $form['sexo']? to
 this:

 ul
 li id=chico
 label class=etiqueta_opcion_sexo for=usuario_sexo_0Chico/label
 input type=radio id=usuario_sexo_0 value=0 name=usuario[sexo]
 /li

 li

 label class=etiqueta_opcion_sexo for=usuario_sexo_1Chica/label
 input type=radio id=usuario_sexo_1 value=1 name=usuario[sexo]
 /li
 /ul

 But now, how can i set the checked one? Using if's? or is there any more
 elegant way?

 Regards

 Javi

-- 
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

To unsubscribe from this group, send email to 
symfony-users+unsubscribegooglegroups.com or reply to this email with the words 
REMOVE ME as the subject.


[symfony-users] Re: Question about choice widget

2010-03-28 Thread tayhimself
Why not use jquery and onclick and show/hide the two different li

On Mar 25, 2:08 pm, Javier Garcia tirengar...@gmail.com wrote:
 Well, what i mean is, if the genre stored of a member is male, it
 should be active in Chico, so how can i do it? using if's and
 functions that retrieve the genre of the member to set the radio
 button state ?

 Javi

 On Mar 25, 7:03 pm, Javier Garcia tirengar...@gmail.com wrote: Hi,

  i have an edit form with a choice widget with radio buttons.

  Symfony renders the options in a column, but I wanted the choices in the
  same line this way:

  Sexo: Chico (o) Chica ()

  So i have modified the code from the line ?php echo $form['sexo']? to
  this:

  ul
  li id=chico
  label class=etiqueta_opcion_sexo for=usuario_sexo_0Chico/label
  input type=radio id=usuario_sexo_0 value=0 name=usuario[sexo]
  /li

  li

  label class=etiqueta_opcion_sexo for=usuario_sexo_1Chica/label
  input type=radio id=usuario_sexo_1 value=1 name=usuario[sexo]
  /li
  /ul

  But now, how can i set the checked one? Using if's? or is there any more
  elegant way?

  Regards

  Javi

-- 
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

To unsubscribe from this group, send email to 
symfony-users+unsubscribegooglegroups.com or reply to this email with the words 
REMOVE ME as the subject.


[symfony-users] Re: Question about choice widget

2010-03-26 Thread Tom Ptacnik
Maybe you can look for decorator(formatter), with that you can still
use ?php echo $form['sexo']?

it's decorator or formatter, I'm not sure for now ;)

There is some official tutorial on Symfony pages, but I can't find it
now

Try this adresses or google
http://bluehorn.co.nz/2009/08/31/symfony-12-sfform-formatter-to-add-stars-on-required-fields/
http://erisds.co.uk/symfony/snippet-symfony-forms-setting-the-form-formatter


On 25 bře, 19:08, Javier Garcia tirengar...@gmail.com wrote:
 Well, what i mean is, if the genre stored of a member is male, it
 should be active in Chico, so how can i do it? using if's and
 functions that retrieve the genre of the member to set the radio
 button state ?

 Javi

 On Mar 25, 7:03 pm, Javier Garcia tirengar...@gmail.com wrote:



  Hi,

  i have an edit form with a choice widget with radio buttons.

  Symfony renders the options in a column, but I wanted the choices in the
  same line this way:

  Sexo: Chico (o) Chica ()

  So i have modified the code from the line ?php echo $form['sexo']? to
  this:

  ul
  li id=chico
  label class=etiqueta_opcion_sexo for=usuario_sexo_0Chico/label
  input type=radio id=usuario_sexo_0 value=0 name=usuario[sexo]
  /li

  li

  label class=etiqueta_opcion_sexo for=usuario_sexo_1Chica/label
  input type=radio id=usuario_sexo_1 value=1 name=usuario[sexo]
  /li
  /ul

  But now, how can i set the checked one? Using if's? or is there any more
  elegant way?

  Regards

  Javi

-- 
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

To unsubscribe from this group, send email to 
symfony-users+unsubscribegooglegroups.com or reply to this email with the words 
REMOVE ME as the subject.


[symfony-users] Re: Question about choice widget

2010-03-25 Thread Javier Garcia
Well, what i mean is, if the genre stored of a member is male, it
should be active in Chico, so how can i do it? using if's and
functions that retrieve the genre of the member to set the radio
button state ?

Javi

On Mar 25, 7:03 pm, Javier Garcia tirengar...@gmail.com wrote:
 Hi,

 i have an edit form with a choice widget with radio buttons.

 Symfony renders the options in a column, but I wanted the choices in the
 same line this way:

 Sexo: Chico (o) Chica ()

 So i have modified the code from the line ?php echo $form['sexo']? to
 this:

 ul
 li id=chico
 label class=etiqueta_opcion_sexo for=usuario_sexo_0Chico/label
 input type=radio id=usuario_sexo_0 value=0 name=usuario[sexo]
 /li

 li

 label class=etiqueta_opcion_sexo for=usuario_sexo_1Chica/label
 input type=radio id=usuario_sexo_1 value=1 name=usuario[sexo]
 /li
 /ul

 But now, how can i set the checked one? Using if's? or is there any more
 elegant way?

 Regards

 Javi

-- 
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

To unsubscribe from this group, send email to 
symfony-users+unsubscribegooglegroups.com or reply to this email with the words 
REMOVE ME as the subject.