Prefill Cross-site lookup / set value show empty field
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 ??
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 ??
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Dear ragesoft,
Try to set it with the field value as well, like this:
This is an example from our documentation here - https://spform.com/javascript-framework ... eld-values
Try to set it with the field value as well, like this:
Code: Select all
fd.field('CrossSiteLookup').value({Id: 1, Title: 'Item 1'});
Cheers
-
- Information
-
Who is online
Users browsing this forum: No registered users and 5 guests