Skip to main content

Set checkbox tip text

Sets the desired tip text to all checkboxes with a certain key.

(function () {
let doc = Api.GetDocument();
let allForms = doc.GetAllForms(); // Retrieve all form fields.
let targetKey = "CheckBox10"; // Specify the key of checkboxes to update.
let newTip = "Please update your marital status."; // New tip text.

allForms.forEach(function (form) {
// Check if the form is a checkbox and its key matches the target key.
if (form.GetFormType() === "checkBoxForm" && form.GetFormKey() === targetKey) {
form.SetTipText(newTip); // Set the new tip text.
}
});
})();

Methods used: GetDocument, GetAllForms, GetFormType, GetFormKey, SetTipText

Result

TipTextSetter TipTextSetter