Hi Joe,
Paul's example also contains a script object (look in the hierarchy for myScriptObject under Variables). This script object contains the LockAllFields function that is called from the click event of the button. The function does all of the work.

You can drag this script object to your fragment library, which will then make it available to you in other forms. In your form you would drag it from the library into the hierarchy, over the first page. It will insert the fragment into Variables. You can then right-click on the fragment and convert it to an embedded object.


It should work then,
Niall