Page 1 of 1

Populating more than one field in a related list

Posted: 15 Jun 2020
by mc88
Hi Folks, newbie question so apologies in advance.

I have 2 lists Client and a Voucher, I have followed the example Related Items.
I seem to have it working but seem to have 2 issues

1 the clientid field does not populate when I make it read only it on the New Item form.
2 I would like to populate some field values on the ne item form as well as the clientID, Client name for example.

Any help would be great thanks

Martin

Re: Populating more than one field in a related list

Posted: 16 Jun 2020
by mnikitina
Hello mc88,

1. The field must be editable to be populated with the value. You can hide the field on the form with CSS. For this, add a CSS class to the field, eg "parent-field" and add this CSS to CSS editor:

Code: Select all

$('.parent-field').hide();
2. Yes, you can populate field on the child form with field values from the parent form using window.top. For instance:

Code: Select all

fd.field('TitleChild').value(window.top.fd.field('TitleParent').value());

Re: Populating more than one field in a related list

Posted: 17 Jun 2020
by mc88
Perfect Thank you