<!-- Render (no edit). -->
<ion-item *ngIf="!edit && field && field.name">
    <h2>{{ field.name }}</h2>
    <p><core-format-text [text]="field.value"></core-format-text></p>
</ion-item>
<!-- Edit. -->
<ion-item *ngIf="edit && field && field.shortname" text-wrap [formGroup]="form">
    <ion-label stacked [core-mark-required]="field.required">{{ field.name }}</ion-label>
    <ion-select [formControlName]="field.modelName" [placeholder]="'core.choosedots' | translate" interface="action-sheet">
        <ion-option value="">{{ 'core.choosedots' | translate }}</ion-option>
        <ion-option *ngFor="let option of field.options" [value]="option">{{option}}</ion-option>
    </ion-select>
    <core-input-errors item-content [control]="form.controls[field.modelName]"></core-input-errors>
</ion-item>
