如何在anotheer表单中创建表单以接受不同的值集 [英] How to create a form within anotheer form to accept differennt set of values

查看:108
本文介绍了如何在anotheer表单中创建表单以接受不同的值集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在另一个表单中创建一个表单

例如

如果有2个输入单选按钮

现金和善意<然后,如果用户选择现金选项,那么另一个数据字段应该打开询问他想以现金捐赠多少,如果他选择了种类,则必须打开一个复选框列表以选择

i donno如何在表格中做这样的事情因为我是网络的新人



我尝试过的事情:



I want to create a form within another form
FOR EXAMPLE
if there is are 2 input radio buttons
cash and kindness
then if a user selects cash option then another data field should open asking how much he wants to donate in cash and if he selects kind then a list of checkboxes must open to select from
i donno how to do such a thing in forms since i am a new person to web

What I have tried:

<pre><div class="col-md-3">
      <div class="loc-widget form-widget">
                <h4>Want to help someone ??</h4>
        <h5 style="color:#fff;">Do you want to donate in cash or kind ??</h5>
                <ul>
                <li class="radio">
        <label  style="color:#fff;"><input type="radio" name="optradio">Cash</label>
                </li>
                <li class="radio">
        <label  style="color:#fff;"><input type="radio" name="optradio">Kind</label>
                </li>                               
                   <li>
                    <button type="submit">Submit</button>
                  </li>
                              
                </ul>
              </div>
            </div>



这是我想知道如何做我想做的表格


This is the form i have n i would like to know how to do what i desire

推荐答案

无需其他表格。你可以使用相同的表格



创建控制以获取现金价值和其他复选框以获得善意。当他们选择特定的单选按钮然后显示相应的控件时,让他们隐藏。



为此使用javascript或jquery。
No need for another form. you can use same form

create controls for taking cash value and other checkboxes for kindness. make them hide.

when user selects particular radio button then show the corresponding controls. use javascript or jquery for this.


这篇关于如何在anotheer表单中创建表单以接受不同的值集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆