Multi-type of columns use in one column

yes-no , dropdown and text

// Some code

    <div class="form-group mb-3" hidden>
      <label>Setting Content</label>
      <input class="form-control" formControlName="settinglist">
    </div>

    <div class="form-group mb-3">
      <label>Name</label> <span style="color: red"> *</span>
      <input class="form-control" formControlName="settingname" readonly>
    </div>

    <div class="form-group mb-3">
      <label class="form-check-label" for="flexSwitchCheckDefault">Value</label> <span style="color: red"> *</span>
      <span *ngIf="DisplayType=='text'">
        <input class="form-control" formControlName="settingvalue">
      </span>

      <span *ngIf="DisplayType=='dropdown'">
        <select class="form-select form-control" formControlName="dropdown_value" id="inputGroupSelect03">
          <option *ngFor="let item of DropdownList" [ngValue]="item.id">{{item.name}}</option>
        </select>
      </span>

      <span *ngIf="DisplayType=='yesno'">
        <div class="form-check form-switch">
          <input class="form-check-input" type="checkbox" style="width:35px;height:20px;" value="0" formControlName="yesno_value"/>
        </div>
      </span>
    </div>

Last updated

Was this helpful?