jquery.repeater icon indicating copy to clipboard operation
jquery.repeater copied to clipboard

How can I use two repeater in one single form?

Open sadhan4github opened this issue 6 years ago • 8 comments

Hello, I am using your form repeater plugin in my project and I want to use two section for repeater in one form but I can't implement it. Can you please tell me how can I implement two repeater section in one form ? Please check the image

download

sadhan4github avatar May 22 '18 20:05 sadhan4github

Hello, i'm with the same problem... Have you solved it yet?

rakelcoelho avatar Jul 10 '18 20:07 rakelcoelho

i have same problem

abmohajeri avatar Jul 31 '18 06:07 abmohajeri

any idea pls?

abmohajeri avatar Jul 31 '18 06:07 abmohajeri

No I didn't get any solution. I have done via custom jquery to implement dynamic row for each section.

sadhan4github avatar Jul 31 '18 07:07 sadhan4github

I didn't find any solution too, therefore i do some hack on this plugin ;)

abmohajeri avatar Jul 31 '18 07:07 abmohajeri

Surround them in separate <div class='repeater'> tags .

<form class="">
  Repeater 1 
  <div class='repeater'>
     <!-- Make sure the repeater list value is unique  -->
      <div data-repeater-list="group-a">
          <div data-repeater-item>
               <input type="text" name="text-input" value="A"/>
               <input data-repeater-delete type="button" value="Delete"/>
         </div>
        <div data-repeater-item>
              <input type="text" name="text-input" value="B"/>
              <input data-repeater-delete type="button" value="Delete"/>
        </div>
       </div>
    <input data-repeater-create type="button" value="Add"/>
 </div>
  
  Repeater 2
    <div class='repeater'>
       <!-- Make sure the repeater list value is different from the first repeater  -->
       <div data-repeater-list="group-b">
           <div data-repeater-item>
            <input type="text" name="text-input" value="G"/>
            <input data-repeater-delete type="button" value="Delete"/>
          </div>

        </div>
        <input data-repeater-create type="button" value="Add"/>
     </div>
</form>

Click here to view a working example.

digvijayad avatar Oct 11 '18 22:10 digvijayad

Surround them in separate <div class='repeater'> tags .

<form class="">
  Repeater 1 
  <div class='repeater'>
     <!-- Make sure the repeater list value is unique  -->
      <div data-repeater-list="group-a">
          <div data-repeater-item>
               <input type="text" name="text-input" value="A"/>
               <input data-repeater-delete type="button" value="Delete"/>
         </div>
        <div data-repeater-item>
              <input type="text" name="text-input" value="B"/>
              <input data-repeater-delete type="button" value="Delete"/>
        </div>
       </div>
    <input data-repeater-create type="button" value="Add"/>
 </div>
  
  Repeater 2
    <div class='repeater'>
       <!-- Make sure the repeater list value is different from the first repeater  -->
       <div data-repeater-list="group-b">
           <div data-repeater-item>
            <input type="text" name="text-input" value="G"/>
            <input data-repeater-delete type="button" value="Delete"/>
          </div>

        </div>
        <input data-repeater-create type="button" value="Add"/>
     </div>
</form>

Click here to view a working example.

try it

OldKing-lion avatar Oct 09 '19 08:10 OldKing-lion

Fantastic!

This works perfectly!

hackernewbie avatar Nov 20 '21 17:11 hackernewbie