Use Toggle (Checkbox Field) to Submit Change

Proximate 01 Nov, 2019
Hi community

I would like to use a checkbox (in toggle mode) inside a table to set a state for this item. (as easy example: paid/ not paid for an event registration).
I can do it via task button and its working but how can i use a checkbox to call the save event / function ?

in the forum i found already this snipped:
jQuery(document).on('change', 'input[name="tgl_payment"]', function() { jQuery('.ui.form').form('submit'); } )
to submit the whole form but i just want to call it for one row see the working save function debug via task button :
Array
(
    [save_changes] => Array
        (
            [data] => Array
                (
                    [modified] => 2019-11-01 16:36:42
                    [payment] => 1
                )

            [_success] => Data saved successfully
            [log] => Array
                (
                    [0] => UPDATE `simm_team_registration` AS `Reg` SET `modified` = '2019-11-01 16:36:42', `payment` = '1' WHERE `aid` = '159';
                )

            [var] => Array
                (
                    [modified] => 2019-11-01 16:36:42
                    [payment] => 1
                )

        )

)

So is there a way to call this function via jquery and the checkbox (set /unset paid)?

thanks for pointing me into the right direction.

Kind regards
Proxi
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger