Page 1 of 1

Custom fields change function not triggered

Posted: 20 Oct 2016
by lijupnandanan
Hi,
I have a custom field for cross site look up. That's dropdown field. But the change function of that dropdown is not working. how can i resolve this?

I used this code

fd.field('ProjectType').change(function()

{

});



If its a normal sharepoint look up field then the change event works perfectly. This is not working only in case of my custom field.

Re: Custom fields change function not triggered

Posted: 20 Oct 2016
by Dmitry Kozlov
Please, try this:

Code: Select all

fd.field('Project1').control()._el().find('select').change(function() {
  // your code here
});

Re: Custom fields change function not triggered

Posted: 20 Oct 2016
by lijupnandanan
Hi,
How can I get the selected value of this look up column?

I tried both this .. But doesn't works.

alert(fd.field('Project1').control().value());

alert(fd.field('Project1').control()._el().text());

Re: Custom fields change function not triggered

Posted: 20 Oct 2016
by lijupnandanan
I tried this also
fd.field('Project1').control('getSelectedText')

but not working

Re: Custom fields change function not triggered

Posted: 20 Oct 2016
by Dmitry Kozlov
What about this:

Code: Select all

fd.field('Project1').control()._el().find('select option:selected').text();

Re: Custom fields change function not triggered

Posted: 20 Oct 2016
by lijupnandanan
Thank you.. its working :)