How do I make a textfield Read-Only in EasyMode?
To make a text element read-only in EasyMode, please do the following:
- Click on the Form Settings icon at the top of the page.
- Go to the SCRIPTS tab.
- In the "Initialization Script" section, click on "Custom."
- Click the "Create code framework" text. (It's a link.) A popup will appear that says:
Create code framework for init now? (Existing code will be appended)
Click "OK."
- A textarea will appear that looks something like this:
function ff_YourFormName_init() { } // ff_YourFormName_init
After the first curly bracket, add:
ff_getElementByName("bla").readOnly=true;
So the final code should look something like this:
function ff_YourFormName_init() { ff_getElementByName("bla").readOnly=true; } // ff_YourFormName_init
Remember to change the "bla" in the getElementByName line to the actual name of your textfield element. Also, the "YourFormName" text in the first and last lines should actually match the name of your form. (This should happen automatically after clicking on Create code framework)