Skip to main content

SetAllExcept

Sets all fields be reset except the fields whose names are specified

Syntax​

expression.SetAllExcept(isAllExcept);

expression - A variable that represents an ApiResetFormsAction class.

Parameters​

NameRequired/OptionalData typeDefaultDescription
isAllExceptRequiredbooleanNo description provided.

Returns​

boolean

Example​

This example creates a reset forms action and changes its all-except mode.

let doc = Api.GetDocument();
let page = doc.GetPage(0);

let textField = Api.CreateTextField([10, 10, 160, 30]);
textField.SetPartialName("myTextField");
page.AddObject(textField);

let buttonField = Api.CreateButtonField([10, 40, 160, 60]);
page.AddObject(buttonField);

let resetAction = Api.CreateResetFormsAction(false, ["myTextField"]);
let widgets = buttonField.GetAllWidgets();
widgets[0].GetActions().SetMouseUp(resetAction);

resetAction.SetAllExcept(true);
console.log('Is all except after change: ' + resetAction.IsAllExcept());