Hello,
I am trying to disable and then enable a selector style lookup field. I've tried it to do it this way but it doesn't work like that:
$('#R12345 img, #txtR12345').hide();
I would like to hide both the text field and the selector button and if there are any values associated with that lookup field. I've seen a post like this before but it did not help me much.
https://community.progress.com/community_groups/rollbase/f/25/t/7264.aspx
Could you possibly point me in the right direction?
You are better off hiding the field and its label. The following will work
$('#rbi_F_R12345, #rbi_L_R12345').hide();
Hi,
We can hide the lookup field using 'Design this Page' option.
Find attached screen shot.
Please let me know if you have any questions.
Thanks and Regards,
Chandra.
I would like to do that programmatically based on a checkbox selection, i.e. if the checkbox is selected make the lookup field (along with the selector) disabled .. else make that enabled.
You are better off hiding the field and its label. The following will work
$('#rbi_F_R12345, #rbi_L_R12345').hide();
And if I want to set that lookup field's value to null? Would I have use setfieldvalue in that case?
setFieldValue will do the job of setting the field's actual value to null but for the visual aid (list of related items beneath the textbox) you will have to do something extra.
$('#rtable_R12345').children().remove();
Ok that really does help. Thanks for that.