|
|
|
|
@ -125,10 +125,15 @@ class html_form { |
|
|
|
|
$html_output = []; |
|
|
|
|
$errors = []; |
|
|
|
|
$headers = []; |
|
|
|
|
$skip_output = []; |
|
|
|
|
foreach(SafeIO::esv($input['html']) as $html) { |
|
|
|
|
$key = $html['name'] ?? ""; |
|
|
|
|
$html_output[$key] = $html['html']; |
|
|
|
|
$headers[$key] = $html['meta']['field_desc'][$key] ?? ""; |
|
|
|
|
$skipping = $html['meta']['skip_output'][$key] ?? null; |
|
|
|
|
if ($skipping === true) { |
|
|
|
|
$skip_output[$key] = true; |
|
|
|
|
} |
|
|
|
|
$show_labels = $html['meta']['show_label'][$key] ?? true; |
|
|
|
|
$form_type = $html['meta']['form_type'][$key] ?? FORM_TYPE::text; |
|
|
|
|
$form_data_list = $html['meta']['form_data_list'][$key] ?? []; |
|
|
|
|
@ -199,13 +204,17 @@ class html_form { |
|
|
|
|
$label_name = $label ?? $key; |
|
|
|
|
$r_a['placeholder'] = $label_name; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$input_name = (isset($form_ctrl['name'])) ? $form_ctrl['name'] : $key; |
|
|
|
|
|
|
|
|
|
$this->$type_of_form_input($input_name, array_merge($fc, ['id'=>$key, 'value'=>$value], $r_a)); |
|
|
|
|
$this->close_div(); |
|
|
|
|
} |
|
|
|
|
return ['html_output'=>$html_output, 'headers'=>$headers, 'errors'=>$errors]; |
|
|
|
|
return [ |
|
|
|
|
'html_output'=>$html_output, |
|
|
|
|
'headers'=>$headers, |
|
|
|
|
'skip_output'=>$skip_output, |
|
|
|
|
'errors'=>$errors |
|
|
|
|
]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private function do_escape(string $content, array & $options): ?string { |
|
|
|
|
|