瀏覽代碼

add option 'require' for textarea form elements

pull/7692/head
父節點
當前提交
8db7934a30
共有 2 個檔案被更改,包括 2 行新增1 行删除
  1. +1
    -0
      doc/smarty3-templates.md
  2. +1
    -1
      view/templates/field_textarea.tpl

+ 1
- 0
doc/smarty3-templates.md 查看文件

@ -177,6 +177,7 @@ Field parameter:
1. Label for the input box,
2. Current text for the box,
3. Help text for the input box.
4. if set to "required" modern browser will check that this input box is filled when submitting the form,
### field_yesno.tpl

+ 1
- 1
view/templates/field_textarea.tpl 查看文件

@ -1,7 +1,7 @@
<div class="field textarea">
<label for="id_{{$field.0}}">{{$field.1}}</label>
<textarea name="{{$field.0}}" id="id_{{$field.0}}" aria-describedby="{{$field.0}}_tip">{{$field.2}}</textarea>
<textarea name="{{$field.0}}" id="id_{{$field.0}}" aria-describedby="{{$field.0}}_tip"{{if $field.4 eq 'required'}} required{{/if}}>{{$field.2}}</textarea>
{{if $field.3}}
<span class="field_help" role="tooltip" id="{{$field.0}}_tip">{{$field.3 nofilter}}</span>
{{/if}}

載入中…
取消
儲存