Skip to main content

Copy or Clone a Collection Item

Intro

The "Clone Collection Item" feature in a web app allows users to duplicate specific items with ease, streamlining content creation and ensuring consistency. This functionality is valuable for replicating data structures or content layouts, saving time and effort in the management process.

In this video tutorial you will understand how to copy the data of an existing record and create new data with it.

1. Create a Page to Clone Collection Item

Go to Pages and Add Page. Name the page and click Create.

DrapCode Builder Export Import Collection Item

2. Clone the Page

In the page Settings choose the page to clone and click Update. This will help you create aform with pre-filled data from this page.

DrapCode Builder Export Import Collection Item

3. Create an Event to Clone the Collection

Go to Events and choose Add Event. Now name the event and click Create.

DrapCode Builder Export Import Collection Item

3.1 Configure the Event

Choose Collection and allow it to Save Data.

DrapCode Builder Export Import Collection Item

3.2 Add Details

Name the collection and add notifications messages (optional) and Save.

DrapCode Builder Export Import Collection Item

3.3 Redirect the Page

Choose Navigation and Page Redirect to do so.

DrapCode Builder Export Import Collection Item

3.4 Specfify Navigation Preference

Name the page to redirect too and Save.

DrapCode Builder Export Import Collection Item

4. Bind the Event

Go back to your form and bind the above event to it. For this open the form Settings and choose the event and then Save.

DrapCode Builder Export Import Collection Item

5. Redirect the Button

You can create a button using Components in the page you have chosen to redirect to. Then open the Settings of the button and choose the Page and Save.

This action will take you to the page with the ID of the product and pre-filled data.

DrapCode Builder Export Import Collection Item

6. Create Data from Page Bind to the Collection

To do so, open the form Settings and change the Method to POST. Then tick the Skip Item ID and Save.

DrapCode Builder Export Import Collection Item

7. Test the Button

Now when you click this button it will come with pre-filled data that you can edit and Submit.

DrapCode Builder Export Import Collection Item

Conclusion

One key benefit of the "Clone Collection Item" feature in a web app is its ability to significantly reduce the time and effort required for content creation and management by enabling users to quickly replicate specific items, ensuring consistency and uniformity throughout the application.