<div class="form-group{% if id_prefix+'_text' in errors %} has-error{% elif id_prefix+'_text' in form_data %} has-success{% endif %}" style="padding-right:0.75em; flex-grow: 1">
    {% if schema.markdown %}
      <textarea style="resize: vertical; min-height: 171px;" class="form-control" data-markdown-textarea="true" name="{{ id_prefix }}_text" placeholder="{{ (schema.placeholder or schema.title) | get_translated_text }}">{% if id_prefix+'_text' in form_data %}{{ form_data[id_prefix+'_text'] }}{% elif data is not none and "text" in data %}{{ data.text }}{% endif %}</textarea>
    {% elif 'multiline' in schema and schema['multiline']  %}
      <textarea style="resize: vertical; min-height:2.5em; height:4em;" type="text" class="form-control" name="{{ id_prefix }}_text" placeholder="{{ (schema.placeholder or schema.title) | get_translated_text }}">{% if id_prefix+'_text' in form_data %}{{ form_data[id_prefix+'_text'] }}{% elif data is not none and "text" in data %}{{ data.text }}{% endif %}</textarea>
    {% elif 'choices' in schema %}
      <select class="form-control selectpicker" name="{{ id_prefix }}_text">
      {% if form_data.get(id_prefix+'_text', '') != '' or (data is not none and data.get('text', '') != '') %}
        {% if not is_required %}
          <option value="">&mdash;</option>
        {% endif %}
      {% else %}
      <option selected="selected" value="">&mdash;</option>
      {% endif %}
      {% for option in schema.choices %}
        {% if id_prefix+'_text' in form_data %}
          {% if form_data[id_prefix+'_text'] == ( option | to_string_if_dict ) %}
          <option value="{{ option }}" selected="selected">{{ option | get_translated_text }}</option>
          {% else %}
          <option value="{{ option }}">{{ option | get_translated_text }}</option>
          {% endif %}
        {% elif data is not none and "text" in data %}
          {% if data.text == option %}
          <option value="{{ option }}" selected="selected">{{ option | get_translated_text }}</option>
          {% else %}
          <option value="{{ option }}">{{ option | get_translated_text }}</option>
          {% endif %}
        {% else %}
          <option value="{{ option }}">{{ option | get_translated_text }}</option>
        {% endif %}
      {% endfor %}
      </select>
    {% else %}
      <input type="text" class="form-control" name="{{ id_prefix }}_text" placeholder="{{ (schema.placeholder or schema.title) | get_translated_text }}" {% if id_prefix+'_text' in form_data %}value="{{ form_data[id_prefix+'_text'] }}"{% elif data is not none and "text" in data %}value="{{ data.text }}"{% endif %}>
    {% endif %}
    {% if id_prefix+'_text' in object_errors %}<span class="help-block"><strong>{{ _('Error:') }}</strong> {{ object_errors[id_prefix+'_text'] }}</span>{% endif %}
</div>
