Page 1 of 1
Update a form inside a collapsible block
Posted: Sat Jan 07, 2017 12:47 am
by Angela Temple Rogers
I am displaying details of items in a collapsible block. I thought it would be nice to use input boxes so the item could be edited and updated right there. I added a button in the collapsible block and have it invoking a service when clicked. I do the mapping from the data in the collapsible block before send but it doesn't get any info. I guess that makes sense that it doesn't know what data from the collapsible list to get, but how do I map the data appropriately when they click update? Do I need to use javascript?
Update a form inside a collapsible block
Posted: Sat Jan 07, 2017 5:55 am
by Angela Temple Rogers
So I decided to try saving the form values to a storage model when an item is expanded. I then invoke the service and map the local storage to the fields to send before send which seems to give me what I need to do the update. But after trying to do an update, I get this message in the inspect console: 256 used as a key, but it is not a string. setItem @ localforage.js:1612
256 is the id of the item I'm trying to update. It is in a mySql database running on Amazon RDS and exposed using the API Express. Any ideas?
Update a form inside a collapsible block
Posted: Tue Jan 10, 2017 5:06 pm
by Serhii Kulibaba
Hello,
Could you please provide us with more details, screenshots or exact steps to reproduce this problem?
Update a form inside a collapsible block
Posted: Wed Jan 11, 2017 6:40 pm
by Angela Temple Rogers
I shared with support. When it goes to the StorageItems page it loads the data from the database, but if I edit anything, like changing the amount, and click Update, nothing happens but if you inspect the code the console shows the following in this image.
Update a form inside a collapsible block
Posted: Wed Jan 11, 2017 8:19 pm
by Serhii Kulibaba
Please clarify, what name does your app have?
Update a form inside a collapsible block
Posted: Wed Jan 11, 2017 10:42 pm
by Angela Temple Rogers
Update a form inside a collapsible block
Posted: Thu Jan 12, 2017 4:16 am
by Angela Temple Rogers
Never mind. I figured out why it wasn't updating. Had to do with the date format saving to mySql. The warning doesn't seem to affect it. Thanks.