I want to have a select box in a basic module in Admin.

edited July 2013 in Modules
I want to have a select box in a basic module in Admin. Is it possible to create one by creating a data type called SET in Mysql database? I am using FUEL version 0.9.3. If not how can I achieve that? Please reply.

Comments

  • edited 5:09PM
    In your form_fields method on your model you can change the "type" attribute of your field to a select and then set the options to the set values you want:
    ... $fields['my_field']['type'] = 'select'; $fields['my_field']['options'] = array('opt1' => 'opt1', 'opt2' => 'opt2'); ...
  • edited 5:09PM
    This worked for me. Thank you very much for your reply.
Sign In or Register to comment.