checks($id_record); $list = []; foreach ($checks as $check) { $list[] = [ 'id' => $check->id, 'text' => $check->content, ]; } echo '
{[ "type": "text", "label": "'.tr('Contenuto').'", "name": "content", "required": 1 ]}
{[ "type": "select", "label": "'.tr('Genitore').'", "name": "parent", "values": '.json_encode($list).', "required": 1 ]}
{[ "type": "select", "label": "'.tr('Utente').'", "name": "assigned_user", "ajax-source": "utenti", "required": 1 ]}
';