I have a input on the page. Users can put multiple items separated by ";", eg tomato; potato. Then I want to store them to an array in the database.
How I can do that?
Hello Alan,
To add data to database you need to use create service
https://devcenter.appery.io/documenta...
This is not very help helpful. I still don't know how to store the array. I expect the answer would be some JS code or something. I don't know.
I did use create service. Everything is working except the array. The question is I don't know how to store the array.
Hi Alan,
Please follow these steps:
Click on JS on needed link in mapping.
Details: http://prntscr.com/6yyy9e/direct
Populate it with following JS code:
pre
var str = value; //"tomato; potato; carrot";
var jsonArray = '["' + str.replace(/;/gi, '", "') + '"]';
var arrayObject = JSON.parse(jsonArray);
return arrayObject;
/pre
Regards.