Multiselect_searchable not showing selected option

Hi
My code is working perfect when I tried to add an item but on the edit form the multiselect_searchable field is not showing my selected options, just an empty field is returned.

Looking at my database the options are saved as expected like 1,2,5, etc…, my collation field type is latin1_swedish_ci and field type as text.

      $GrupoRowContactos=$AgendaModel->contactos($this->session_userData['id']);
      $GrupoMultiselectContactos = array();        
      foreach($GrupoRowContactos as $GrupoResultContactos) {
          $GrupoMultiselectContactos[$GrupoResultContactos->id] = $GrupoResultContactos->nombres." ".$GrupoResultContactos->apellidos." (".$GrupoResultContactos->alias.") (+".$GrupoResultContactos->whatsapp_pais.") ".$GrupoResultContactos->whatsapp;
      }
      $crud->fieldType('participantes', 'multiselect_searchable', $GrupoMultiselectContactos);

Any clue?

FYI: With ‘multiselect_native’ works like a charm.

FYI: The column show all selected values

Looking at web browser console I found the following code when input field is displayed:

HERE IS MY SELECTED VALUE
.......

so, if I remove the following code “overflow: hidden; white-space: nowrap; width: 0px;” I am able to see all selected values but this only happens in one of my pages other ones works perfectly.

Any clue?

On readField (View state) selected options are displayed correctly, as well in columns.

Hello @urgido ,

Unfortunately I can’t reproduce your issue. Trying with a simple code like this:

$crud->fieldType('test_multiselect', 'multiselect_searchable', [
    '1' => 'test',
    '2' => 'test 2',
    '3' => 'test 3',
    '4' => 'test 4',
    '5' => 'test 5',
    '6' => 'test 6',
]);

And I am getting the expected results on edit:

From what I understand this is most probably an issue that you have from your CSS, so something in your template is pushing away I guess the fields. Are you using latest Grocery CRUD Enterprise? version 3.1.13 ?

Regards
Johnny