Sandbox: JavaScript

Delegator for tying the values of two inputs together. Note that this is not bi-directional. Changing the source input will update the target(s), but not vice versa. If you want that two-way mirror, put the trigger on each input.

Example

<div class="col">
  <div class="form-group col-md-3">
    <input type="text" class="form-control"
      data-trigger="inputMirror"
      data-inputmirror-targets="
      [
        {
          'selector': '!.col .target'
        }
      ]"
    />
  </div>
  <div class="form-group col-md-3">
    <input type="text" class="form-control target"/>
  </div>
</div>

Delegator Options

These options apply only to the data- tag invocation.

Name type default description
targets string ~ Selector to find the mirrored input(s).
property string 'value' The property to mirror.