CodeKit Code Select PHP Demo

CodeKit - Interface to a universal code table.

Code sets are often used to present user data entry choices rather than hardcode specific values in application source code. Web pages and other documents often need to display codefied database values as human readable descriptions.

CodeKit makes this a snap to program. You can see the PHP method calls to CodeKit that produce these HTML select elements from database code sets.

This page shows off the CodeKit code select functions. Select various combinations of countries and months then click [Test CodeKit] at the bottom to see the selected codes:

VariableCode(s)
$mycurrency''
day''
country[]
month[]

Have fun!

Select a currency.

Pass in a specific code value.

print $codekit->select('currency', array(
                       'value' => $mycurrency
));
    
$mycurrency is '':

Radiobox for days of the week.

Constrain choices to the weekdays (1-5).
A blank separator displays them all on one line.

print $codekit->radio('day', array(
                      'subset' => array(1, 2, 3, 4, 5),
                      'sep'    => ''
));
    
'day' is ''.

MondayTuesdayWednesdayThursdayFriday

Select multiple countries.

Specify a window scrolling size of 10.

Experiment with Ctrl-click and Shift-click.
to select multiple countries.

print $codekit->multiple('country', array(
                         'size' => 10
));
    
'country' contains []:

Checkbox for multiple month selections.

Simple no frills method call.

print $codekit->checkbox('month');
    
'month' contains []:

January
February
March
April
May
June
July
August
September
October
November
December

<-- Click here to see the updated PHP variables!