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

id="{{ sprintf('%s[%s]',@name,@key) }}" id="{{ sprintf('%s[%s]',@name,@key) }}"
name="{{ sprintf('%s[%s]',@name,@key) }}" name="{{ sprintf('%s[%s]',@name,@key) }}"
value="true" 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) }}"> <label for="{{ sprintf('%s[%s]',@name,@key) }}">
{{ @val }}</label><br> {{ @val }}</label><br>
</repeat> </repeat>

Loading…
Cancel
Save