I am struggling to figure out how to bind my form data into a JSON string. My situation involves using a string field in the database and saving checkbox values in a single database column using JSON. I have created an HTML form, but I am unsure of how to bind all the data in the database. If anyone has experience with this, please guide me.
documentList: [
{
'IsSpecifications': false,
'IsSpecificationscomment': ''
},
{
'IsDrawSchedule': false,
'IsDrawSchedulecomment': ''
},
...
];
<div class="my-3">
<ejs-checkbox label="isSpecifications()" labelPosition="Before"></ejs-checkbox>
</div>
...
</div>
Within the database, I utilize the documentlist field where all checkbox values are stored as a JSON string.