readonly object lookup with more than 20 items

Discussions about Forms Designer for SharePoint 2010.
Locked
Mario
Posts: 6
Joined: Sat Nov 17, 2012

30 May 2013

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

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

30 May 2013

Please, use the following script:

Code: Select all

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:

Code: Select all

fd.field('Lookup').control()._el().find('input').removeAttr('disabled');
fd.field('Lookup').control()._el().find('img').show()

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest