Code

Discussion on easy Row Duplication - jQuery Plugin

mrgingles

mrgingles supports this item

Supported

6 comments found.

any plans to introduce drag and drop to arrange the rows ?

I’m working on this feature and it will be available soon in the next version 1.1 ;)

I’ve just sent the version 1.1 to the Envato Team and I’m waiting for the approval. As soon as it gets approved, you’ll have the drag-and-drop function.

Will you be adding any database insert functionality to this? If so it’ll really be a time saver!

Thank you for your suggestion! Since this is a JS Plugin, I don’t really know on what type of server-side language are the single users working and what is their DB structure. Moreover, this plugin supports the duplication of many different html element (not only text input, textarea, radio, checkboxes etc), nested following the user preferences, so it’s impossible to follow a standard structure in order to prepare the rows to be pushed into a DB.

However, obviously, there is a VERY simple solution that you can adopt. Every row you create has a class easyRowDuplicationRowElement. Use the “each” function of jQuery in order to cycle them and then prepare your data to be pushed into your preferred DB as you want! Here is a simple JSFiddle example: https://jsfiddle.net/mrgingles/nrrqfb69/

Should you need further informations, feel free to ask here ;)

Hi,

I just bought your script, and I have a simple issue. With all the duplicated field names I would like to number them as they are added to the page.

so for instance.

fieldname_1 fieldname_2 fieldname_3 etc

I couldnt see this in the docs, any suggestions. thanks

Hi! you can change your field names on the fly by writing your own custom function and calling it using the “afterAddCallback”, “afterDeleteCallback” and “sortableOptions” callbacks (see the docs).

At the moment this function is not provided natively, probably I’ll implement it in a future update. Stay tuned ;)

Hi,

Is it possible to use on $(this).parent(’.form-group’).easyRowDuplication({ ... ?

Thanks, Mick

>The position is not modified.

Oups that works ! a problem with my browser…!

Also, is it possible to obtain the number of the row one callback ?

Thanks again!

Is it possible to obtain the number of the row on callback ?

Hi! Glad you’ve solved your problem with the position. At the moment the plugin doesn’t offer a native way to obtain the number of the row. However, you can use the “afterAddCallback” callback to perform actions after the row is added and try to integrate the functionality you need. You can do the same thing when sorting.

Wow! What fantastic. Good Luck.

Can this product duplicate lines with drop-down fields? I am looking to build an invoicing application where products are selected in the first field and all the details fill in fields on the same line. I then would like to use your code to create additional lines. The drop-down values would come from a mysql db.

emart53

emart53 Purchased

I am back working on my invoice project again and had a few questions. My client is a commercial nursery warehouse and will be creating invoices for the wholesale clients. They have over 2000 products which are selected alphanumerically from a drop down box. My plan is to use a MySQL view to list all available product descriptions, inventory quantity and price. When the user selects the description, the row will populate with inventory quantity and price along with a blank quantity field where the user enters the order amount (which must be less than or equal to the inventory quantity). I was hoping to get started using your plug-in, but my experience with plug-in is limited. Can you point me to an example of how your plug-in would be used in a situation like this? Any example would be greatly appreciated.

It’s not difficult to implement this. Please write me at info@vincenzomennella.it with some example code and every other information I may need to solve your problem and I’ll be happy to help you :)

emart53

emart53 Purchased

I am working on the base code right now and will send it as soon as I have it ready. Thank you for the fast response.

by
by
by
by
by
by