Render a single checkbox

Discussion specific to symfony 1.1.x stable

Moderator: hartym

Render a single checkbox

Postby RickP » Tue Jul 22, 2008 8:49 pm

Hi,

I have a form with a layout that is quite hard to implement with sfForm.

I have to put some radiobuttons on a website like this (The O's are the radio buttons, the undersores are for the spacing):

O Blabla________________blablablabla bla
________________________blabla bla

O MoreBla_______________bla bla bla
________________________bla

I didn't find a way to render a single checkbox from a sfWidgetFormSelectRadio widget in order to construct the divs for the rows. Can someone give me a hint how I can accomplish this?

regards,
Rick
Last edited by RickP on Tue Jul 22, 2008 8:50 pm, edited 1 time in total.
RickP
Junior Member
 
Posts: 4
Joined: Tue Jun 03, 2008 8:41 pm
Location: Hamburg, Germany

Re: Render a single checkbox

Postby WolfEng » Wed Jul 23, 2008 3:43 am

I think the 3rd chapter in "The synfony forms book" might help you out on the layout problem, and maybe you find further info about select boxes in the 1st chapter, here's a link http://www.symfony-project.org/book/forms/1_1/en/03-Forms-fo r-web-Designers, cheers!

.:WolfEng:.
WolfEng
Junior Member
 
Posts: 28
Joined: Tue Jul 22, 2008 8:54 am

Re: Render a single checkbox

Postby RickP » Wed Jul 23, 2008 12:02 pm

WolfEng wrote: I think the 3rd chapter in "The synfony forms book" might help you out on the layout problem, and maybe you find further info about select boxes in the 1st chapter, here's a link http://www.symfony-project.org/book/forms/1_1/en/03-Forms-fo r-web-Designers, cheers!

.:WolfEng:.


Thanks, but I already read it and it doesn't mention rendering a single radiobutton from a sfWidgetFormSelectRadio widget.

I just solved this by setting a custom formatter for this widget, but I don't like the solutions because it moves part of the layout from the template to the form class.
RickP
Junior Member
 
Posts: 4
Joined: Tue Jun 03, 2008 8:41 pm
Location: Hamburg, Germany


Return to symfony 1.1

Who is online

Users browsing this forum: No registered users and 1 guest