Group Label for Radio Buttons

View: New views
3 Messages — Rating Filter:   Alert me  

Group Label for Radio Buttons

by Steve Piercy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Howdy,

By default radio buttons render like so (with some CSS mods):

        ( )  option 1
        ( )  option 2
        ( )  option 3

I'd like them to render like so:

    Radio Group Name
        ( )  option 1
        ( )  option 2
        ( )  option 3

Is there some method to do that?

Currently I have to do the janky dance of $f->renderform(-from=N,-to=N) and put "Radio Group Name" above.

--steve

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy               Web Site Builder               Soquel, CA
<web@...>                  <http://www.StevePiercy.com/>

--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <knop@...>.
To unsubscribe, E-mail to: <knop-off@...>
Send administrative queries to  <knop-request@...>
List archive http://www.nabble.com/Knop-Framework-Discussion-f29076.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/

Re: Group Label for Radio Buttons

by Johan Solve-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Try -optgroup. The markup could be better but it will be rendered also for radios and checkboxes, although it's native use is for selects.


At 03.58 -0700 2009-08-23, Steve Piercy - Web Site Builder wrote:

>Howdy,
>
>By default radio buttons render like so (with some CSS mods):
>
>        ( )  option 1
>        ( )  option 2
>        ( )  option 3
>
>I'd like them to render like so:
>
>    Radio Group Name
>        ( )  option 1
>        ( )  option 2
>        ( )  option 3
>
>Is there some method to do that?
>
>Currently I have to do the janky dance of $f->renderform(-from=N,-to=N) and put "Radio Group Name" above.
>
>--steve
>
>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>Steve Piercy               Web Site Builder               Soquel, CA
><web@...>                  <http://www.StevePiercy.com/>
>
>--
>#############################################################
>This message is sent to you because you are subscribed to
>the mailing list <knop@...>.
>To unsubscribe, E-mail to: <knop-off@...>
>Send administrative queries to  <knop-request@...>
>List archive http://www.nabble.com/Knop-Framework-Discussion-f29076.html
>Project homepage http://montania.se/projects/knop/
>Google Code has the latest downloads at http://code.google.com/p/knop/


--
     Johan Sölve    [FSA Member, Lasso Partner]
     Web Application/Lasso/FileMaker Developer
     MONTANIA SOFTWARE & SOLUTIONS
http://www.montania.se   mailto:joh-n@...
 (spam-safe email address, replace '-' with 'a')

--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <knop@...>.
To unsubscribe, E-mail to: <knop-off@...>
Send administrative queries to  <knop-request@...>
List archive http://www.nabble.com/Knop-Framework-Discussion-f29076.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/

Re: Group Label for Radio Buttons

by Steve Piercy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Got it!  Thank you!  It does exactly what I want, once I read that it belongs in the -options array instead of outside of it.  :)

--steve


On Sunday, August 23, 2009, inbox_js@... (Johan Solve) pronounced:

>Try -optgroup. The markup could be better but it will be rendered also for radios
>and checkboxes, although it's native use is for selects.
>
>
>At 03.58 -0700 2009-08-23, Steve Piercy - Web Site Builder wrote:
>>Howdy,
>>
>>By default radio buttons render like so (with some CSS mods):
>>
>>        ( )  option 1
>>        ( )  option 2
>>        ( )  option 3
>>
>>I'd like them to render like so:
>>
>>    Radio Group Name
>>        ( )  option 1
>>        ( )  option 2
>>        ( )  option 3
>>
>>Is there some method to do that?
>>
>>Currently I have to do the janky dance of $f->renderform(-from=N,-to=N) and put
>"Radio Group Name" above.
>>
>>--steve
>>
>>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>Steve Piercy               Web Site Builder               Soquel, CA
>><web@...>                  <http://www.StevePiercy.com/>
>>
>>--
>>#############################################################
>>This message is sent to you because you are subscribed to
>>the mailing list <knop@...>.
>>To unsubscribe, E-mail to: <knop-off@...>
>>Send administrative queries to  <knop-request@...>
>>List archive http://www.nabble.com/Knop-Framework-Discussion-f29076.html
>>Project homepage http://montania.se/projects/knop/
>>Google Code has the latest downloads at http://code.google.com/p/knop/
>
>
>--
>     Johan Sölve    [FSA Member, Lasso Partner]
>     Web Application/Lasso/FileMaker Developer
>     MONTANIA SOFTWARE & SOLUTIONS
>http://www.montania.se   mailto:joh-n@...
> (spam-safe email address, replace '-' with 'a')
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy               Web Site Builder               Soquel, CA
<web@...>                  <http://www.StevePiercy.com/>

--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <knop@...>.
To unsubscribe, E-mail to: <knop-off@...>
Send administrative queries to  <knop-request@...>
List archive http://www.nabble.com/Knop-Framework-Discussion-f29076.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/