DubFriend / jquery.repeater

Create a repeatable group of input elements
MIT License
389 stars 191 forks source link

Repeater Indexing #97

Open CarlosJa opened 5 years ago

CarlosJa commented 5 years ago

There's a bug with the repeater... When i post the form it'll have the following

documents[0][0] documents[1][1] documents[2][2] documents[3][]

Is it possible to turn of the indexing.. Technically you don't need indexing as post request will automatically index the form fields.. Indexing should be set if someone is interested in doing drag and dropping.. but this should be an option.

I had to modify the library to make it work properly.

                                                                <select name="appType" class="form-control">
                                                                    <option value="CNT">Contract</option>
                                                                    <option value="APP">Application</option>
                                                                    <option value="ACH">ACH Forms</option>
                                                                </select>
                                                                </div>
                                                            <div class="col-md-3">
                                                                <label class="control-label">FileUploader</label>
                                                                <input id="exampleInputFile" name="" class="form-control"  type="file">
                                                            </div>
                                                            <div class="col-md-1">
                                                                <label class="control-label">&nbsp;</label>
                                                                <a href="javascript:;" data-repeater-delete class="btn btn-danger">
                                                                    <i class="fa fa-close"></i>
                                                                </a>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <hr>
                                                    <a href="javascript:;" data-repeater-create class="btn btn-info mt-repeater-add">
                                                        <i class="fa fa-plus"></i> Add Variation</a>
                                                    <br>
                                                    <br> </div>
                                            </div>
                                        </div>