Browse Source

respect required keyword in checkboxes

master
Dom SP 2 years ago
parent
commit
171263c26b
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      app/views/form.htm

+ 2
- 1
app/views/form.htm View File

@@ -46,7 +46,8 @@
id="{{ sprintf('%s[%s]',@name,@key) }}"
name="{{ sprintf('%s[%s]',@name,@key) }}"
value="true"
{{ is_array(@info.checked) ? (in_array(@key,@info.checked) ? 'checked' : '') : (!strcmp(@key,@info.checked) ? 'checked' : '') }} />
{{ is_array(@info.checked) ? (in_array(@key,@info.checked) ? 'checked' : '') : (!strcmp(@key,@info.checked) ? 'checked' : '') }}
{{ is_array(@info.required) ? (in_array(@key,@info.required) ? 'required' : '') : (!strcmp(@key,@info.required) ? 'required' : '') }} />
<label for="{{ sprintf('%s[%s]',@name,@key) }}">
{{ @val }}</label><br>
</repeat>

Loading…
Cancel
Save