I’m creating a custom ExpressionEngine extension and I need to add a checkbox. I’m struggling to find the options I need to use for the channel fields API.
Currently I have:
array( 'field_name' => 'business_for_sale', 'field_label' => 'Business For Sale?', 'field_type' => 'checkboxes', 'field_order' => 25, 'field_instructions' => 'Is there a business for sale with the commerical property?', 'field_required' => 'n', 'field_search' => 'y', 'field_is_hidden' => 'n', 'field_list_items' => "Yes", )
I just want either a single checkbox that will act as a boolean (checked is yes, un-checked is no). Alternatively, I would settle for two radios buttons—one representing Yes and one representing No that the administrator could choose.