Adding checked items to rows into google sheet

Hi there. I have a screen where allows me to pick a date and in a inline list with a students related to a class, I want to mark the presents students, click a button and send only the checked students into a sheet with id_class; date_class and id_alumno, how can I setup the button to do that?