checklists()->orderBy('created_at')->get(); $list = []; foreach ($checklists as $checklist) { $list[] = [ 'id' => $checklist->id, 'text' => $checklist->name, ]; } echo '
{[ "type": "select", "label": "'.tr('Checklist').'", "name": "checklist", "values": '.json_encode($list).' ]}
{[ "type": "select", "label": "'.tr('Utente').'", "name": "assigned_users", "ajax-source": "utenti", "multiple": 1 ]}
{[ "type": "select", "label": "'.tr('Gruppo').'", "name": "group_id", "values": "query=SELECT id, nome AS text FROM zz_groups" ]}
';