Grayed out checkbox unless text field is filled

60 Views Asked by At

I have a requirement where I need to gray out Enabled(checkbox button) until the textbox is filled once we enter anything in the textbox checkout button should enable it.

output

Coding in HTML, Angular.js and Webobject

   <div class="carbon-copy-text"
     *ngIf="ticketItem.clientCcEnabled">
  <whd-autocomplete *ngIf="ticketItem.preference.allowUserLookupByClient; else autocompleteBlock"
                    [textBoxValue]="carbonCopy"
                    [itemSource]="userLookupSource"
                    (onAutoCompleteSearchChange)="searchForClients($event)"
                    (onAutoCompleteSelectionChange)="emitCarbonCopyEmails($event)">
  </whd-autocomplete>
  <div class="carbon-copy_enabled">
    <nui-checkbox [value]="getCarbonCopyState()"
                  [checked]="getCarbonCopyState()"
                  (valueChange)="changeCarbonCopyEnable($event)">
      Enabled
    </nui-checkbox>
  </div>
0

There are 0 best solutions below