This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Table Structure: Shop <---> Backend User+shop <---->Backend User
I already set belongsToMany in Shop and Backend User For now, When I submit the shop information including USERNAME (using dropdown menu) the table can be updated successfully
However,After submission of shop information -> refresh -> the USERNAME in dropdown menu cannot be selected to be default item
Can anyone teach me how to fixed it?
Problem solved found that in module\backend\widgets\form\partials_fields_dropdown.htm line:25
<?= $value == $field->value ? 'selected="selected"' : '' ?>
should be
<?= $value == $field->value[0] ? 'selected="selected"' : '' ?>
becuase the $field->value is array type we have to change it to string for matching $value
1-2 of 2