Browse Source

make textare and input type text can have maxlength attributes

master
Dominik Schmidt-Philipp 1 day ago
parent
commit
213969051c
1 changed files with 14 additions and 2 deletions
  1. +14
    -2
      app/views/form.htm

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

size="{{ array_key_exists('length',@info) ? @info.length : 20 }}" size="{{ array_key_exists('length',@info) ? @info.length : 20 }}"
value="{{ array_key_exists('value',@info) ? @info.value : '' }}" value="{{ array_key_exists('value',@info) ? @info.value : '' }}"
placeholder="{{ @info.description }}" placeholder="{{ @info.description }}"
{{ (array_key_exists('required',@info) && @info.required ) ? 'required' : '' }} />
{{ (array_key_exists('required',@info) && @info.required ) ? 'required' : '' }}
<check if="{{ isset(@info.maxlength) }}">
<true>
maxlength="{{ @info.maxlength }}"
</true>
</check>
/>
<!--<label for="{{ @name }}">{{ @info.description }}</label>--><br> <!--<label for="{{ @name }}">{{ @info.description }}</label>--><br>
</true> </true>
</check> </check>
id="{{ @name }}" id="{{ @name }}"
cols="{{ @info.cols }}" cols="{{ @info.cols }}"
rows="{{ @info.rows }}" rows="{{ @info.rows }}"
placeholder="{{ @info.description }}">{{ @info.value }}</textarea>
placeholder="{{ @info.description }}"
<check if="{{ isset(@info.maxlength) }}">
<true>
maxlength="{{ @info.maxlength }}"
</true>
</check>
>{{ @info.value }}</textarea>
<!--<label for="{{ @name }}">{{ @info.description }}</label>--> <!--<label for="{{ @name }}">{{ @info.description }}</label>-->
<br> <br>
</true> </true>

Loading…
Cancel
Save