make field read only

184 views
Skip to first unread message

GL

unread,
May 14, 2009, 9:38:39 AM5/14/09
to Adobe LiveCycle Developers
I am trying to have selecting one of the options on a radio button
make other fields read only. I've tried this:
TravelPaymentForm.PersonaInfo.Vehicle.VehicleState::click -
(JavaScript, client)
Expenses.Expenses.Row1.Miles1.access = "readOnly";

It isn't working. Ideas?

Gary

Ramya S

unread,
May 14, 2009, 11:40:20 AM5/14/09
to live...@googlegroups.com
Hi Gary,
 
The code does seem to be correct... However, can you please check whether you have saved the form as "Dynamic".. just in case...Also, whether the hierarchy of the fields are correct....
 
Ramya...

GL

unread,
May 14, 2009, 12:20:59 PM5/14/09
to Adobe LiveCycle Developers
Yes, it is dynamic. And hierarchy is correct. I checked by using the
Insert SOM capability in the script editor. I am wondering if it has
to do with putting it on a specific option on the radio button.
> > Gary- Hide quoted text -
>
> - Show quoted text -

Angie Okamoto

unread,
May 14, 2009, 12:32:04 PM5/14/09
to live...@googlegroups.com
Gary,
A radio button's value is recorded in the radio button list. To check
if it is selected or not, you need to look at the list value.
You may also want to revert back to the previous state if the user
changes their mind and selects another button. I would recommend an
If statement on the change event of the radiobuttonlist that looks
something like this:

if (radiobuttonlist.rawValue ==1) {
Expenses.Expenses.Row1.Miles1.access = "readOnly";
}
if (radiobuttonlist.rawValue ==2) {
Expenses.Expenses.Row1.Miles1.access = "";
}

Angie
--
Angie Okamoto

GL

unread,
May 14, 2009, 12:58:25 PM5/14/09
to Adobe LiveCycle Developers
That worked. Thanks!
Gary
> Angie Okamoto- Hide quoted text -
Reply all
Reply to author
Forward
0 new messages