Help with Multicheck field in admin UI / Core related questions / Forums

  • Based off of:

    Code Used:

    Basically service record area of the plugin I am working on (for a type of clan/roster system) - got a section to give users qualifications - so the dropdown multicheck list will display the Qualifications, and assign each one to the selected user. However, when editing a user in the service records, it's a regular dro down list,, that only shows number 1.

    Inline edit is true, but it displays nothing to edit on the list of current users in the service records.

    This is the plugin:

    Right now the qualifications have been set in another db table - but want to get rid of that - tried setting up this same method last year but ran into the issue of hard coded userclasses tree.

  • It's hard without data.

    If you debug dropdown field, you should do this:

    1. try it with hardcoded list of options
    for example:

    $this->fields['qual_id']['writeParms']['optArray'] = array('element_setting_0','element_setting_1', 'element_setting_2');

    if everything works, then you can try normal dropdown from database.

    2. replace by data from database
    $rows = e107::getDB()->retrieve("qualifications_sys", "*", true, true);
          foreach($rows as $qua) {
            $this->qualsys[$qua['qual_id']] = $qua['qual_name'];
    			$this->fields['qual_id']['writeParms']['optArray']  = $this->qualsys;

    And only if everything works, add multicheck

    3. add multicheck

    'writeParms' => array('multiple'=> 1 ),

    Not tested readmode without data.

  • Thanks, that worked. Must have been my array/query
Moderator(s): Jimako
Search just forum
You must be logged in to post comments on this site - please either log in from the Login box or from here.

  • Jimako
    Jimako  1 month ago

    New version of metatag plugin is tested now here... some messages can be see from time to time :)

  • Jimako
    Jimako  1 month ago

    There is new theme mdbootstrap in my github repository for anybody who want to learn new way how to build e107 theme. It's built with focusing on step by step. Anybody who have interest, just let know about you and start ask questions while I am on the beginning.

  • Jimako
    Jimako  1 month ago

    For download something, you need to subscribe class Real e107 user in your profile. (if you didn't get message on homepage)

  • Jimako
    Jimako  1 month ago

    @Moc I changed settings to PM available for class Real e107 user (class able to download free things) and I added you this class. And created issue because I have no idea how this should work.

  • Jimako
    Jimako  1 month ago

    @Moc Could be possible that Mention plugin stopped to work? No mail notification. Sorry.