summaryrefslogtreecommitdiff
path: root/public/app/controllers/JsonToForm.php
diff options
context:
space:
mode:
Diffstat (limited to 'public/app/controllers/JsonToForm.php')
-rw-r--r--public/app/controllers/JsonToForm.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/public/app/controllers/JsonToForm.php b/public/app/controllers/JsonToForm.php
index 5df650d..7df8098 100644
--- a/public/app/controllers/JsonToForm.php
+++ b/public/app/controllers/JsonToForm.php
@@ -219,7 +219,7 @@ class JsonToForm
// print_r([ $set_value, $name, ($default_values->$name ?? 'none') ]);
$appendKey = in_array('append-key', $attributes) ? true : false; // append key (for selects)
- $required = in_array('required', $attributes) ? '' : ''; // required
+ $required = in_array('required', $attributes) ? 'required' : ''; // required
$asterisk = in_array('required', $attributes) ? '*' : ''; // asterisk in label if required
$html .= "
@@ -239,7 +239,7 @@ class JsonToForm
// prepare initialization of select2 (multiple)
$initSelectsJS .= "
var {$name} = $('#{$name}');
- {$name}.select2({ width: '100%', placeholde: '{$label}' });";
+ {$name}.select2({ width: '100%' });";
if ($set_value) { // if default value is set
$initSelectsJS .= "