Problems with checkboxes with readOnly set to true
Posted: Tue Jul 27, 2010 10:56 pm
Hi, I am having an issue with the checkboxes on my forms, we are currently moving from 4.1.7 to 5.1.4. We did not experience this problem in 4.1.7. On load/show the checkboxes readOnly properties are set to true. When the user clicks a button to enable "edit" I have to set all fields on my form to readOnly = false. The following code works for all other elements on my form, but the checkboxes are never able to set the readOnly = false unless I set the field properties through a qualifid name.
Has anyone experienced this? Is there a better way to do this?
what I do is:
Thanks
Has anyone experienced this? Is there a better way to do this?
what I do is:
- Code: Select all
for(i in elements.allnames)
{
var elementName = elements.allnames[i];
var args = elementName.split('_');
if(args[0] == 'fld')
{
elements[elementName].readOnly = !lv_find_mode;
elements[elementName].enabled = lv_find_mode;
if (elements[elementName].getElementType() != 'CHECK')
elements[elementName].editable = lv_find_mode;
}
}
//added to fix checkbox readonly issue
elements.fld_fv_active_ind.readOnly = !lv_find_mode;
elements.fld_fv_current_seis_status.readOnly = !lv_find_mode;
elements.fld_fv_dimension.readOnly = !lv_find_mode;
elements.fld_fv_dirty.readOnly = !lv_find_mode;
elements.fld_fv_k_original_owner.readOnly = !lv_find_mode;
elements.fld_fv_k_ownership_class.readOnly = !lv_find_mode;
Thanks