Save selected items to another form

i did create a form. I want to save selected items to another form-database or grid.
how can i create checkbox in a form and how can i save selected checbox.
is it possible to make this.
Thanks

Hi,
A form is linked to a table.
If you add new fields (no linked to a field) you could use them to update other table. In an event, onAfterInsert or any other you can use those fields to update other tables of your database

$array = explode(",", {checkbox_list}); //use , or ;
$len = count($array);

for($i=0; $i<$len; $i++)
{
$insert_sql = “INSERT INTO table "
. “(id, value) "
. “VALUES (”. {id}.”,”.$array[$i].")";
sc_exec_sql($insert_sql);

  }

regards

thank you for your help. But i don’t know how to add check box to form :grinning:

In Fields section at the end you’ll see +New field
Then select the type of field (checkbox or radio, etc.)

thank you for your help. in your codes I couldn’t see which table to save to

i did create a new field, but checkbox or radio not coming

I think you want be able to check each record and when you update it or insert, insert some data in other table, isn’t it?

In the new field, in lookup settings set multiple values (binary), then the check will show up

Then, in onAfterUpdate you can verify the {checkfield} and in that case insert or update data in other table.

I hope it can help you

regards

Thank you for your help.
i can’t save selected items to another table. Never mind.
i want to save selected items totals to another field.
Please help me
Thank you