Edit this page

up.Preview up.Preview.prototype.disable([element])
Instance method

Temporarily disables fields and buttons.

The disabled controls will be re-enabled when the preview ends.

Also see Disabling forms while working.

Example

This preview disables an input[name=email] and all controls within a container matching .button-bar:

up.preview('.sign-in', function(preview) {
  preview.disable('input[name=email]')
  preview.disable('.button-bar')
})

Parameters

[element=this.fragment] Element|string optional

The element (or selector) within which fields and buttons should be disabled.

If omitted, fields and buttons within the targeted fragment will be disabled.