Page 1 of 1

Prefill Cross-site lookup / set value show empty field

Posted: 08 Jun 2018
by ragesoft
Hi,

i have a lookup to another list setup to show the title of the item.

When i try to set the lookup to a special item i'm using the fd.field("Lookup").value("1") method.
It will fill the value. if i save the form, the correct item is set.
But in form the lookup will get empty with a "X" on the end to clear the lookup.
The "title" is not showing up.

If i set it manually by selecting the dropdown, all is fine.

do i have to call a "onchange" or something like this, after setting the value ??

Re: Prefill Cross-site lookup / set value show empty field

Posted: 08 Jun 2018
by Nikita Kurguzov
Dear ragesoft,
Try to set it with the field value as well, like this:

Code: Select all

fd.field('CrossSiteLookup').value({Id: 1, Title: 'Item 1'});
This is an example from our documentation here - https://spform.com/javascript-framework ... eld-values