Prefill Cross-site lookup / set value show empty field

Discussions about Cross-site Lookup
Locked
ragesoft
Posts: 50
Joined: Fri Feb 23, 2018

08 Jun 2018

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 ??

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

08 Jun 2018

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
Cheers

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests