I can clone this without problem (with my custom button "Add Section") but I realised that you cannot click on fields like "Date" or "DropDown" or even buttons that have been cloned. I can always add an eventlistener but that seems a bit farfetched.
Do you have solutions or pointers for this?
Thanks in advance!
This is just a simple example to show the problem. The idea is that there will be multiple of these kinds sub forms that can be replicated (N-N relation).
That being said, I am aware of the list and library. But not what we are looking for.
It would be nice to see find a solution to this.
Thanks
I have a form that has normal fields of the list. Based on the choices/data, I might have to fill in another set of fields. These fields can be extensive and have also impact on other fields in the form. How to create repeating sections - Forms - Community
This kind of problem has been discussed here too. Since Plusmail is not providing the solution, I am trying to make the best out of Plumsail and JS.
That being said, you am using the below to clone the section for your reference:
const container = document.getElementById("SimpleReaptorsSection");
const originalSection = $(`#${containerId}`)[0].querySelector(".repeatable-section");
// Clone the first section
const newSection = originalSection.cloneNode(true);
// Append the new section to the container
container.appendChild(newSection);/
Where "SimpleReaptorsSection" is just a html placeholder in plumsail and "repeatable-section" is class given to a grid of fields (as shown in the photo of the original question).
The cloned grids however are not clickable. How can I make those editable? I hope you can replicate this and help me further.
Thank you!
How do you plan to store the values from the duplicated section?
Have you tried creating multiple grids using SharePoint or common fields and showing/hiding them conditionally?
For further assistance, we need more details about the case. Could you please provide more information, an example of the form structure, a description of your use case.
Have you considered using a Data Table control to collect the repeating data?
It allows the user to create/remove rows with predefined fields, but it's also more compact and easier to use than the node cloning approach.
The control is similar to List or Library but doesn't store its entries as SharePoint items. Instead, you can store them as JSON in a plain text field.