Page 1 of 1

autofill in iFrame

Posted: Tue Nov 03, 2020 9:24 am
by paulkauz
This code works ans sets the new field to (2), why does the $('#stat_MassnID').val(parent.nuForm.getCurrent().record_id).change(); not work if I uncomment it?

if(!nuMainForm() && nuFormType() == 'edit'){

nuHide('MassnStatID');

if (nuIsNewRecord()){

/*
$('#stat_MassnID')
.val(parent.nuForm.getCurrent().record_id)
.change();
*/

$('#stat_MassnID').val(2).change();
}
}


Regards
Paul

Re: autofill in iFrame

Posted: Tue Nov 03, 2020 10:01 am
by kev1n
Hi Paul,

Give this a go (Note the spelling: nuFORM instead of nuForm)

Code: Select all

$('#stat_MassnID').val(parent.nuFORM.getCurrent().record_id).change();

Re: autofill in iFrame

Posted: Tue Nov 03, 2020 11:56 am
by paulkauz
Hi Kevin

Works perfect, thanks a lot for teh quick help.

regards
Paul