Jump to content


molay

Member Since 06 Jan 2019
Offline Last Active Private
-----

Topics I've Started

pass variable into add form and insert in a different table

06 January 2019 - 12:49 AM

Hi Experts,

i'm new in GC.

i have a view that gives me the follwing info from table (A) :

id , customer , amount , balance 

i have added an add_action to perform a transaction for a selected customer. 

example for customer with id=1 :

when clicking on the "perform transaction" button i do see the action /xxx/transaction/add/?id=1

 

the action should insert data in a different table (B) 

So i get a new form to add a transaction. however  i'm not able to assign the id=1 to that transaction ..

in other terms i'm unable to pass the variable id with value 1 to the new form and insert a new transaction for customer id =1 

 

Any help will be appreciated.

Thanks