This topic is locked
[SOLVED]

 Form Field - Disabling

1/17/2013 1:53:14 AM
PHPRunner General questions
D
dustinforehand author

Hello Everyone,

I am looking to see if anyone has any solutions for this.
I have a form that I use the auto fill. Is there a way to disable the fields that are populate from the user, but still record the date that is auto-filled from the look up.
Example

Case Number - I put a number in this field and it autofills the

Address, city, county, zip fields.

Those fields are still edit-able. After its autofilled you can go back and change the data that was auto filled.
I hope I explained the correctyly.. Any help appreciated.

C
cgphp 1/17/2013

In the "Javascript onload" event, you can make the Address, city, county and zip fields readonly. For example:

var ctrlAddress = Runner.getControl(pageid, 'Address'); //Replace Address with the real name of the field

var ctrlCity = Runner.getControl(pageid, 'city'); //Replace city with the real name of the field

var ctrlCounty = Runner.getControl(pageid, 'county'); //Replace county with the real name of the field

var ctrlZip = Runner.getControl(pageid, 'zip'); //Replace zip with the real name of the field
ctrlAddress.getDispElem().attr("readonly", "readonly");

ctrlCity.getDispElem().attr("readonly", "readonly");

ctrlCounty.getDispElem().attr("readonly", "readonly");

ctrlZip.getDispElem().attr("readonly", "readonly");