spawn a second form

Archived support forum for customers who once purchased a PrimalForms product license. This forum is locked.
This topic is 12 years and 4 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
R1Johnny
Posts: 37
Last visit: Mon Dec 12, 2022 7:15 am

spawn a second form

Post by R1Johnny »

Good afternoon,Can you please tell me how to spawn a second form based on the input of the first form?For example, if a user selects a specific option from the first form I'd like to offer 4 more sub-items to select from which would be displayed in the second formThank you.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

spawn a second form

Post by davidc »

The easiest way to do this is to use script scope variables: $script:Option1 = 2$script:Option2 = "Car", "Van", "Truck"etc. In the second form, use these variables on Form_Load event to fill any selection or data necessary. FYI, use the Call- functions to call any sub-form. David
David
SAPIEN Technologies, Inc.
User avatar
R1Johnny
Posts: 37
Last visit: Mon Dec 12, 2022 7:15 am

spawn a second form

Post by R1Johnny »

Good morning.I see that you are setting the scope to "Script" in your example.If I need to pass the variable back to the calling script should I use a "Reference" variable declaration?Thanks.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

spawn a second form

Post by davidc »



If you
continue to use the script scope, the calling form should have access to the
results.

Note:
PrimalForms will automatically generate variable results for certain form
controls, such as the TextBox, ComboBox and a few others.



When you press
David
SAPIEN Technologies, Inc.
This topic is 12 years and 4 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.