I have a base class called field and classes that extend this class such as text, select, radio, checkbox, <
field
text
select
radio
checkbox
$field_type = 'checkbox'; $field = new $field_type;
If you need arguments:
$field_type = 'checkbox'; $field = new $field_type(5,7,$user);