Lookup field vs insert function

Lookup field vs insert function

Hello,

I have two forms.. in 1st i have an useful custom button which uses insert function and inserts data to another one. something like this:

  1.   insert into Form2
  2.     [
  3.         Name_in_form2 = input.Name_in_form1
  4.    ...

But when i put lookup field instead of regular text field it will not work anymore. Is there any simple solution for this ?
Thanks very much