$shareform = F::form();
$shareform->attr([
'action' => '',
'method' => 'post',
'enctype' => 'multipart/form-data',
'id' => 'fileshare_form',
'name' => 'fileshare_form',
]);
$shareform->add([
'customerGUID' => F::hidden()->val($setting->user_setting('companyGUID')),
'token' => F::hidden()->val($f3->get('SESSION.csrf'))->id('token'),
'recordIds' => F::hidden()->val('')->id('recordID'),
'description' => F::text()->maxlength(50)->required()->addClass('form-control')->id('description')->label('Description'),
'sendto' => F::select()->addClass('send-to')->addClass('custom-select')->id('send-to')->attr('multiple', 'multiple')->attr('style', 'display:none;')->label('Select e-mail recipients')->render($render2),
]);
echo $shareform; //Print the form
// ---- Controller ---$f3->route('POST|GET /controller/@controller/@action', function($f3) { if ($f3->get('POST.token') == $f3->get('SESSION.csrf') || $f3->get('GET.token') == $f3->get('SESSION.csrf')) { $f3->set('action',explode('&', $f3->get('PARAMS.action'))[0]); echo View::instance()->render('controller/controller_'.$f3->get("PARAMS.controller").'.php'); } else { die("Suspicious Activity Detected!"); } } );