Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Save button for LCD with read only funktion

Avatar

Level 1

Hallo ,

I will use this script in Adobe LiveCycle Designer ES2 / this script is not working in LCD only in Adobe Acrobat x. I need this script for LiveCycle Designer.

please help me

// Mouse Up script for a button
// Set all fields except buttons to read-only and save
(function () {

    var i, f;

    // Loop through the collection of fields
    for (i = 0; i < numFields; i++) {

        // Get the current field
        f = getField(getNthFieldName(i));

        // Set to read-only if not a button
        if (f.type !== "button") {
            f.readonly = true;
        }
    }

    // Hide this button - you do not have to do this
    event.target.display = display.hidden;

    // Save the file
    app.execMenuItem("SaveAs");

})();
1 Reply

Avatar

Level 7

Yes it is 7 years late but the problem could be this line

if (f.type !== "button") {

it should be != not !==