How to create a radio button and/or select menu via ConfigAssistant?

Webmaestro's Avatar


06 Aug, 2010 03:59 PM

I need to create the ability for folks to choose between a few colors, which cries out for either a select menu or radio buttons:

  • black
  • gray
  • white

How do I make this happen? At present I only see form submission type options for:

  • text
  • textarea
  • radio-image
  • checkbox
  • file

I guess I could use a radio-image but it seems a little overkill to create graphic set for this.

  1. 1 Posted by Webmaestro on 06 Aug, 2010 06:19 PM

    Webmaestro's Avatar

    Whoop! I just noticed there is a type: select value in my config.yaml file:

            type: select
            values: '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20'
            default: 10
            label: Main
            hint: "Maximum number of recent updates on main Recent Updates page"
            tag: "MaxRecentUpdatesMain"
            order: 1
            fieldset: recent_updates_set

    (it's just not documented... ;-)

    Also (apparently) not documented is support for type: radio:

            type: radio
            values: 'white,gray,black'
            default: 'black'
            label: 'Site Header Colors'
            hint: "Specify the CSS Color for the site description"
            tag: SiteDescriptionColor2
            order: 16
            fieldset: global_options_set

    You guys thought of everything! (except that pesky documentation part! ;-)

  2. 2 Posted by Dan Wolfgang on 06 Aug, 2010 08:27 PM

    Dan Wolfgang's Avatar

    There's actually quite a bit of documentation:

    I took a look and even see the select field type; there isn't a radio buttons option. So, this makes me wonder if you're looking at something really old? But even so, I think there was always some documentation.

  3. 3 Posted by Byrne Reese on 06 Aug, 2010 09:46 PM

    Byrne Reese's Avatar

    You are looking for type: "radio"

    The structure would look like this:

            label: Background Color
            type: radio
            default: black
            values: black,gray,white
            tag: SiteBackgroundColor

  4. 4 Posted by Dan Wolfgang on 09 Aug, 2010 02:26 PM

    Dan Wolfgang's Avatar

    I've updated the docs with reference to the radio button field type.

  5. Dan Wolfgang closed this discussion on 19 Aug, 2010 12:50 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac