You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I am working on creating a form that is like a treatment log used in the healthcare/aesthetics field. Essentially, I am trying to make a button that when pressed will create/Duplicate of a certain component. For example, need to create another section to chart in when doing treatment on another body part (take info in 'panel' and duplicate it). Using this code in the custom event of a button:
let pushed = false;
util.eachComponent(form.components, function(c) {
if (pushed) return;
if (c.key === 'panel') {
const panelValues = c.data || {};
The Button does the duplicate part well but it clears all data on any previous panels and replace it with the content of the most recently pasted panel. I believe it might have to do with the code referring to the key of the panel so it just copies that.
Could someone guide me on where the error in my code is? For reference, here is the JSON of the form:
Thank you!
Heyo,
So I am working on creating a form that is like a treatment log used in the healthcare/aesthetics field. Essentially, I am trying to make a button that when pressed will create/Duplicate of a certain component. For example, need to create another section to chart in when doing treatment on another body part (take info in 'panel' and duplicate it). Using this code in the custom event of a button:
let pushed = false;
util.eachComponent(form.components, function(c) {
if (pushed) return;
if (c.key === 'panel') {
const panelValues = c.data || {};
}
}, true);
The Button does the duplicate part well but it clears all data on any previous panels and replace it with the content of the most recently pasted panel. I believe it might have to do with the code referring to the key of the panel so it just copies that.
Could someone guide me on where the error in my code is? For reference, here is the JSON of the form:
Thank you!
Duplicate Button form.txt
The text was updated successfully, but these errors were encountered: