Pass variables between forms (frontend)
Posted: Wed Oct 08, 2025 1:58 pm
Hi community. I think this isn't an issue for many NB devs, but recently i've been struggling with that.
Details: Have 2 distinct forms (conventional 'Contracts' and 'Payments') where the Contract has 'contract_num' among its objects and
a button which opens (popup or new breadcrumb) 'Payments' form. And that Payments in turn must have its 'contract' field auto-filled with the '#contract_num#' if opened via 'Contracts' button (& not editable) and just empty (& editable) otherwise.
So i thought i have done something similar using .parent method in past, but here it seems not working, maybe 'Contracts' not considered a parent for the 'Payments' and its just the context needs to be passed somehow..
What's the standart or recommended ways to share context (pass variables) between forms appwide ?
Details: Have 2 distinct forms (conventional 'Contracts' and 'Payments') where the Contract has 'contract_num' among its objects and
a button which opens (popup or new breadcrumb) 'Payments' form. And that Payments in turn must have its 'contract' field auto-filled with the '#contract_num#' if opened via 'Contracts' button (& not editable) and just empty (& editable) otherwise.
So i thought i have done something similar using .parent method in past, but here it seems not working, maybe 'Contracts' not considered a parent for the 'Payments' and its just the context needs to be passed somehow..
What's the standart or recommended ways to share context (pass variables) between forms appwide ?