This topic is locked
[SOLVED]

 JavaScript API: makeReadonly() Fails to Work

5/4/2012 2:52:30 PM
PHPRunner General questions
T
Tricause author

I have a particular need for a record, when being edited, to be marked as read-only as opposed to being writable when the user first adds the record. That is to say, I want the field to act like a regular text field on the "Add page" while being read-only on the "Edit page". I have noticed that there is a flag to apply some selections from "Add page" to "Edit Page", but that appears to only be for default values. When looking up the JavaScript API, I noticed the method makeReadonly() and made a very simple implementation:



ctrlUser = Runner.getControl(pageid, 'st_user');

alert (ctrlUser.isReadonly()); // returns false

ctrlUser.makeReadonly();

alert (ctrlUser.isReadonly()); // still returns false


However, this does not work, although the other JavaScript API does work. Other (potentially) useful information include that I have the field in a tab group, that it has a regular expression validation, and that is is a required. I am not quite sure what is causing the issue.
Thank you for any input.

Sergey Kornilov admin 5/4/2012

Jake,
make sure you use the latest build of PHPRunner. If this doesn't help post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.

T
Tricause author 5/11/2012

The latest build of PHPRunner resolved the issue that is present in build 9948.