readonly object lookup with more than 20 items

rss

Posted by Mario - May 30 ’13 at 03:22

Hello Forum,

Can anyone help me to set a lookup field with more then 20 item readonly in script?

This does not work for me:

fd.field('Lookup').control().readonly(true);

Help is appreciated.

Kind regards,

Mario

  • Dmitry
    Dmitry
    Admin
    Member for: 7 years 6 months 1 day
    #1 by Dmitry May 30 ’13 at 11:52

    Please, use the following script:

    fd.field('Lookup').control()._el().find('input').attr('disabled', 'disabled');
    fd.field('Lookup').control()._el().find('img').hide()
    

    To revert field into editable state use the following script:

    fd.field('Lookup').control()._el().find('input').removeAttr('disabled');
    fd.field('Lookup').control()._el().find('img').show()
    
Displaying 1 to 1 of 1 messages