Hi all, I am doing append data for <div> by using javascript now. But, I am struggling on how to insert data for the fields that I have appended? Can anyone guide me on this?
I have a button to click and once I click, the content of the <div> will be appended. How am I going to insert the data into database that are filled into the appended field? Thanks in advance~
Not sure I understand what you want to do but you could probably define an extra attribute to hold your data then append it to your loaded model in the beforeValidate method
Hi, georaldc. Thanks for the reply. Let me explain to u one more time. Currently, I am having 3 fields to fill out. I wish to append these 3 fields again as I need to fill out more details. But, I do not know how to save that extra 3 fields of data into database since the 3 fields of data are appended. Maybe the image in the attachment can help you to understand my problem clearly.
Ya, but i am wondering how to insert the data from appended field into database?? This is because the appended field is the extra field from the database. If I create the extra fields in my database, how to make sure that the appended field is the extra field in the database? Do you get what I mean?
id | code | name | type | credit_hour | prerequisite | session | total_student | day | start | end |
The [color="#FF0000"]day, start and end[/color] fields will be appended if the user wish to add more details. So, I was wondering how to insert the appended of day,start and end fields into database? The user may append more than one time. Can you guide me? Thanks~