简体   繁体   English

从一种形式传递数据以生成另一种自定义形式

[英]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 1)金属类型:铝,钢
2) Type of application: Roof, Parapet, Footpath 2)应用类型:屋顶,护墙,人行道
3) Number of users: 1, 2, 3, 4, 5, 6, 7, 8 3)用户数量: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: (如果Aluminium被选中,Roof被选中,如果2个用户被选中),那么该表单将生成如下:

1) Inspect the Aluminum system for rust, damage and deformation. 1)检查铝制系统是否生锈,损坏和变形。 Comments: _ __ _ __ _ __ _ __ _ __ _ ____ 编辑点评:_ __ _ __ __ _ _ _ __ __ _ ____

2) Specify the Length of Roof. 2)指定屋顶的长度。 _ ___ ft. Specify the Width of Roof. _ ___ 英尺。指定屋顶的宽度。 ____ _ft. ____ _英尺

3) User 1: _ __ _ __ _ __ . 3)用户1: _ __ _ __ _ __ User 2: 使用者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. 有没有我使用的软件,例如Infopath,Access等。或者可以通过php,xml等来实现。我很困惑。

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. 实际上,有很多不同的方法可以完成此操作,但是由于编程知识有限,这可能相当困难-我不知道有任何可以帮助您的现成解决方案-但Google搜索可能会找到一些方法。

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. 可能最简单的方法是使用PHP,然后将第一个表单提交到特定的php页面,该页面将读取发布数据,然后根据该数据重定向到第二个表单。 Here's some sample (code may not be 100% correct) 这是一些示例(代码可能不是100%正确)

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. 那应该使您入门–具体细节取决于您的表格以及您需要做的事情。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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