This topic is locked

get the displayed value from a Lookup wizard field

12/9/2025 08:03:32
PHPRunner General questions
S
Svic srl author

Hello,
I've this form

img alt

there is a lookup wizard field (News title) based on a table (id, title): link field: id, display field: title.
I need, when the user choices the option, to copy the display field into field named test.
It's possible?
Thank's

Example.jpg
S
Svic srl author 12/9/2025

img alt

Sergey Kornilov admin 12/9/2025

Yes, it is possible. Use Field Events.

S
Svic srl author 12/9/2025

Yes, I've tried the field event with the getPeer function but return the link field.

var ctrlTest = ctrl.getPeer('test');
var ctrlTitle = ctrl.getPeer('NewsTitle');
ctrlTest.setValue(ctrlTitle.getValue());
return false;

C
copper21 12/9/2025

Could you use the autofill feature in the lookup wizard?

Click the autofill button and then select the title to fill in your test field. Make sure to check the box for the edit page too if you need it to be used on the edit page.