Hey!
I have an input text field on the page that is connected to a collection and displays the value of a text field. I want to allow the user to enter the input field, update the text, and, upon exiting the input field, have the new text value updated in the text field collection.
I adjusted the collection settings to allow all users to read and write, but the changes are not reflected in the collection.
How can i make it work? Should i add custom code?
Thanks
Hi Guy, I'm going to assume that you are using a dataset to bind the input to the CMS collection. In that case in order to use the input as an edit/update field, you need to set the dataset to be "Read&Write" and have and bind a button for the "save" action. If you wish to have the field update when the user exits the input, you will need to use some code - specifically the onChange() event for the input. It will look something like this:
$w("#myInput").onChange(async()=>{ await $w("#myDataset).onReadyAsync(); await $w("#myDataset").save(); })
Hope that helps. Best, Eitan