I have collection with fields. I wrote a script to insert item after a form input validation.
When I submit the form, the Item is created in the collection but the fields are duplicated in semi-colon. Can someone help me?
Hi,
We’ll need more information to be able to help. What does your code look like? How are you doing the insert? What are the fields in the collection? What does the form look like?
Yisrael
This my code
this is my collection
you can see duplicated fields in square bracket
I hope that someone will help me. thanks for you answer
OK, I think I understand now. In your insert you are using the Field Name and not the Field Key . So what happens is that the insert “understands” that it needs to add “new” fields to the collection.
A Field Key typically is all lower case:
Your insert should be something like this:
let candidature = {
“nom”: $w("#input9”).value,
“prenom”: $w("#input5”).value,
...
};
Notice that I use the field key nom and not Nom. Small letter and not capital.
Good luck,
Yisrael
Thanks it works.