简体   繁体   English

一种由多个按钮提交的模式引导程序表单

[英]One modal bootstrap form submited by multiple buttons

I have 4 different price tables placed into different tabs and each of them has 3 different packages. 我将4个不同的价格表放在不同的选项卡中,每个价格表都有3个不同的程序包。 You can see them here . 您可以在这里看到它们。

When i click each button unde the package it should open a modal form where i enter client details and then submit the form. 当我单击包装上的每个按钮时,应打开一个模态表格,在该表格中输入客户详细信息,然后提交表格。 When the form is submited i want to know from what package and price table it has been sent from. 提交表单时,我想知道从哪个包裹和价格表发送了它。 How can i do that? 我怎样才能做到这一点? Thank you. 谢谢。

I hope you understand what i want to do. 我希望你了解我想做什么。

Here is a sample 这是一个样本

https://plnkr.co/edit/cvp5XNsw1CHrnW9JWyZB?p=preview

There are a form with 2 text inputs and a submit button. 有一个带有2个文本输入和一个提交按钮的表单。 Below the form you can see 4 buttons: tab1, tab2, tab3 and tab4. 在表格下方,您可以看到4个按钮:tab1,tab2,tab3和tab4。 Let's say these buttons are your tabs. 假设这些按钮是您的标签。 Each tab button has data-tab attribute with unique value. 每个选项卡按钮均具有具有唯一值的data-tab属性。 The data-tab attribute is used to indicate each tab. data-tab属性用于指示每个选项卡。 When you click on one of the tab buttons, the value of submit button is changed. 当您单击选项卡按钮之一时,提交按钮的值将更改。 For instance click the tab2 button and submit the form. 例如,单击tab2按钮并提交表单。 The data that will be send to server will look like this: 将发送到服务器的数据如下所示:

input1=1&input2=2&tab=tab2

Hope the sample will give you a clue. 希望样本能给您一个线索。

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

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