Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8340639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T05:14:07+00:00 2026-06-09T05:14:07+00:00

I am having a form as below. <div class=container> <form method=post action=index.php> <div id=rule>

  • 0

I am having a form as below.

    <div class="container">
    <form method="post" action="index.php">
        <div id="rule">
            <div class="row">
                <div class="span5">
                    <input type="text" class="input-xlarge" value="Rule Name"/>
                </div>
                <div class="span6">
                    <input type="text" class="input-xxlarge" value="Description"/>
                </div>
                <div class="clearfix"> </div>
            </div>
        </div>
        <br />
        <div id="sel" class="select">
            <div class="row">
                <div class="span1 offset2">
                    <p class="btn btn-danger">If</p>
                </div>
                <div class="span2">
                   <select class="span2" name="metrics">
                      <option value="bounce_rate">Bounce Rate</option>
                      <option value="location">Locations</option>
                      <option value="social_media">Social Media</option>
                      <option value="search">Search</option>
                      <option value="visits">Visitors</option>
                    </select>
                </div>
                <div class="span1">
                  <select name="conditions" class="span2">
                       <option value=">">></option>
                       <option value="<"><</option>
                       <option value=">=">>=</option>
                       <option value="<="><=</option>
                        <option value="=">=</option>
                     </select>
                </div>
                <div class="span1 offset1">
                    <input type="text" name="percentage" class="input-small"/>
                </div>
                <div class="clearfix"> </div>
            </div>
            <br />
            <div class="row">
                <div class="span1 offset2">
                    <p class="btn btn-danger">Period</p>
                </div>
                <div class="span3">
                    <div class="input-append date datepicker" data-date="12-02-2012" data-date-format="dd-mm-yyyy">
                      <input class="span2" size="16" type="text" value="12-02-2012" />
                      <span class="add-on"><i class="icon-th"></i></span>
                    </div>
                </div>
                <div class="span3">
                    <div class="input-append date datepicker" data-date="12-02-2012" data-date-format="dd-mm-yyyy">
                      <input class="span2" size="16" type="text" value="12-02-2012" />
                      <span class="add-on"><i class="icon-th"></i></span>
                    </div>
                </div>
                <div class="clearfix"> </div>
            </div>
        </div> 
        <div id="dyna"></div>
        <div id="end">
            <div class="row">
                <div class="span1">
                    <p class="btn btn-danger">THEN</p>
                </div>
                <div class="span3">
                    <input type="text" class="input-xlarge" value="Statement" />
                </div>
                <div class="clearfix"> </div>
            </div>
            <div class="row">
                <div class="span1">
                    <p class="btn btn-danger">ELSE</p>
                </div>
                <div class="span3">
                    <input type="text" class="input-xlarge" value="Statement" />
                </div>
                <div class="clearfix"> </div>
            </div>
            <div class="row">
                <button class="span1 btn btn-success" type="submit" value="submit">Submit</button>
                <div class="span2 offset9">
                    <p class="btn btn-success input-small" id="addRule">Add Rule </p>
                </div>
                <div class="clearfix"> </div>
            </div>
        </div>
    </form>     
</div>

I have included a button ‘Add Rule’ to create a dynamic elements within the above . So I used a javascript for creating dynamic elements as same of above.
The javascript as below.

<script type="text/javascript">
$('.datepicker').datepicker();
(function(){
    var i = 0;
    $("#addRule").live('click',function(){
        ++i;
        var $ctrl = $('<div id="'+ i +'" class="select"><div class="row"><div class="span1 offset2"><button class="btn btn-danger">If</button></div><div class="span2"><select class="span2" name="metrics"><option value="bounce_rate">Bounce Rate</option><option value="location">Locations</option><option value="social_media">Social Media</option><option value="search">Search</option><option value="visits">Visitors</option></select></div><div class="span1"><select name="conditions" class="span2"><option value=">">></option><option value="<"><</option><option value=">=">>=</option><option value="<="><=</option><option value="=">=</option></select></div><div class="span1 offset1"><input type="text" name="percentage" class="input-small"/></div><div class="span2 offset1"><button class="btn btn-danger remove" id="'+ i +'">Remove</button></div><div class="clearfix"> </div></div><br /><div class="row"><div class="span1 offset2"><p class="btn btn-danger">Period</p></div><div class="span3"><div class="input-append date datepicker" data-date="12-02-2012" data-date-format="dd-mm-yyyy"><input class="span2" size="16" type="text" value="12-02-2012" /><span class="add-on"><i class="icon-th"></i></span></div></div><div class="span3"><div class="input-append date datepicker" data-date="12-02-2012" data-date-format="dd-mm-yyyy"><input class="span2" size="16" type="text" value="12-02-2012" /><span class="add-on"><i class="icon-th"></i></span></div></div><div class="clearfix"> </div></div></div>');
        $("#dyna").append($ctrl);
        $('.datepicker').datepicker();
}); 
}) ();

(function(){
    $(".remove").live('click',function(){
        var remDiv = $(this).attr('id');
        //var questionList = "questionList"+remQ;
        $("#" + remDiv).remove();
});

}) ();

So I wanna get the values once i click the submit button. Is it correct way what i am using only a form for fetching the data or am i create two forms separately? So how to do that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T05:14:09+00:00Added an answer on June 9, 2026 at 5:14 am

    You do not need to create a second form if you are inserting the new elements into the existing form and as long as they have different names from any existing inputs you want to receive.

    You can create a second form if you want different submit buttons for the two different collections of input data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am having an form for uploading an excel file like <form enctype=multipart/form-data action=http://localhost/joomla/Joomla_1.5.7/index.php?option=com_jumi&fileid=7
I have a collection of div's belonging to the same class and having form
I'm having an issue in IE7 and below where a form that I'm toggling
I am using JQuery I am having below html: HTML Code: <div id=skywardsLogin style=display:
I am having problems styling form fields with CSS. As you can see below
Having trouble getting a form using PHP, JQuery Form plugin, and JQuery Validate plugin
There is a string having a dot form like this : 1.1.3 I want
Having construction in a form: struct Node { Node():left_(nullptr), right_(nullptr) { } int id_;
Having a popup menu attached to several components on a form (buttons, but also
Having created dropdown lists using ViewBag which is working in an edit form. How

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.