Core API

4.2.8. ['columns'][fieldname]['config'] / TYPE: "radio"

Radio buttons are seldom used, but sometimes they can be more attractive than their more popular sisters (selector boxes).

Here you see radio buttons in action for the "Filemounts" records:

 


Key

Datatype

Description

Scope

type

string

[Must be set to "radio"]

Display / Proc.

items

array

Required.

 

An array of the values which can be selected.

Each entry is in itself an array where the first entry is the title (LS) and the second entry is the value of the radiobutton.

 

See example below.

Display

default

 mixed

Default value.

Display / Proc.

itemsProcFunc

string

(function reference)

PHP function which is called to fill / manipulate the array with elements.

 

The function/method will have an array of parameters passed to it (where the item-array is passed by reference in the key 'items'). By modifying the array of items, you alter the list of items.

For more information, see how user-functions are specified in the section about 'wizards' some pages below here.

Display

 

Example:

An example of radio buttons configuration from "sys_filemounts" (see above):

          'base' => Array (
              'label' => 'BASE',
              'config' => Array (
                  'type' => 'radio',
                  'items' => Array (
                      Array('absolute (root) / ', 0),
                      Array('relative ../fileadmin/', 1)
                  ),
                  'default' => 0
              )
          )

 

To top


Valid XHTML 1.0!