简体   繁体   中英

Passing data from one form to generate another custom form

I want to create a form that our Certified Trainer has to fill out when he goes out into the field to certify a system. This form asks him to specify:

(Dropdown menus; Options seperated by commas)
1) Type of metal: Aluminum, Steel
2) Type of application: Roof, Parapet, Footpath
3) Number of users: 1, 2, 3, 4, 5, 6, 7, 8

When the user submits this information, another form must open up based on what information was inputed above.

For Eg. (If Aluminum was chozen, if Roof was chozen, if 2 users were chozen) then the form generates as follows:

1) Inspect the Aluminum system for rust, damage and deformation. Comments: _ __ _ __ _ __ _ __ _ __ _ ____

2) Specify the Length of Roof. _ ___ ft. Specify the Width of Roof. ____ _ft.

3) User 1: _ __ _ __ _ __ . User 2: __ _ __ _ __ _ .

I hope I've explained exactly what I am trying to achieve here.

I'm trying to pass data to another form that is generated based on the choices of the main form. I've searched everywhere for this but cannot quite get to anything specific.

Is there a software that I use such as Infopath, Access, etc.. or can this be accomplished through php, xml, etc.. I'm quite confused.

I would appreciate if someone could point me in the right direction on this one. Thanks is advance for your help.

There's literally tons of different ways to accomplish this obviously, but with limited knowledge of programming this might be rather difficult - I don't know of any out-of-the-box solution that could help you - but a google search might find something.

Probably the easiest way would be to use PHP, and submit the first form to a specific php page that will read the post data and then redirect to the 2nd form based on that data. Here's some sample (code may not be 100% correct)

if( $_POST['metal_type'] == 'Aluminum' ){
    redirect to the aluminum form page
}else{
    redirect somewhere else
}

That should get you started - the specifics will depend upon your form and exactly what you need to do.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM