<div class="field select">
<label for="id_{{$field.0}}">{{$field.1}}</label>
<select name="{{$field.0}}" id="id_{{$field.0}}" aria-describedby="{{$field.0}}_tip" {{$field.5 nofilter}}>
- {{foreach $field.4 as $opt=>$val}}
- {{if $field.5=='multiple'}}
- <option value="{{$opt}}" dir="auto"{{if $opt|in_array:$field.2}} selected="selected"{{/if}}>{{$val}}</option>
+ {{foreach $field.4 as $opt => $val}}
+ {{if $field.5 == 'multiple'}}
+ <option value="{{$opt}}" dir="auto"{{if in_array($opt, $field.2)}} selected="selected"{{/if}}>{{$val}}</option>
{{else}}
- <option value="{{$opt}}" dir="auto"{{if $opt==$field.2}} selected="selected"{{/if}}>{{$val}}</option>
+ <option value="{{$opt}}" dir="auto"{{if $opt == $field.2}} selected="selected"{{/if}}>{{$val}}</option>
{{/if}}
{{/foreach}}
</select>
<div class="form-group field select">
<label for="id_{{$field.0}}">{{$field.1}}</label>
<select name="{{$field.0}}" id="id_{{$field.0}}" class="form-control" aria-describedby="{{$field.0}}_tip" {{$field.5 nofilter}}>
- {{foreach $field.4 as $opt=>$val}}
- {{if $field.5=='multiple'}}
- <option value="{{$opt}}" {{if $opt|in_array:$field.2}}selected="selected"{{/if}}>{{$val}}</option>
+ {{foreach $field.4 as $opt => $val}}
+ {{if $field.5 == 'multiple'}}
+ <option value="{{$opt}}" {{if in_array($opt, $field.2)}}selected="selected"{{/if}}>{{$val}}</option>
{{else}}
- <option value="{{$opt}}" {{if $opt==$field.2}}selected="selected"{{/if}}>{{$val}}</option>
+ <option value="{{$opt}}" {{if $opt == $field.2}}selected="selected"{{/if}}>{{$val}}</option>
{{/if}}
{{/foreach}}
</select>