'Combo' select : how to set a default value?

edited December 2011 in Feature Requests
Would it be possible to have a default value selected in a multi-select field that makes use of the supercomboselect?
If you take the tutorial and look at the categories model

http://www.getfuelcms.com/user_guide/modules/tutorial#categories_module

how can you set a category to be selected by default (for ex. 'Uncategorized') and just removed from the right pane as soon as the user chooses another category from the left pane?

Hope it's clear what i'm after...

Comments

  • edited 8:36PM
    I'm so dumb. Just assign the 'value' of the field like so :

    $fields['categories'] = array(
    'options' => $category_options, // Possible values (id =>
    'value' => 1, // Choice with id = 1
    'mode' => 'multi' );
    (hope it helps somebody else...)
  • edited 8:36PM
    The value can also be an array which will set multiple values.
  • edited 8:36PM
    exactly...
    still i haven't found an easy way to automatically remove the default value upon manual insertion of another one
Sign In or Register to comment.