How do I make a textfield Read-Only in EasyMode?

To make a text element read-only in EasyMode, please do the following:

  1. Click on the Form Settings icon at the top of the page.
  2. Go to the SCRIPTS tab.
  3. In the "Initialization Script" section, click on "Custom."
  4. 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."

  1. 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)

 

Special Offer

Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!