Connecting checkbox to dataset repeater

Hello all!

I am having some trouble connecting my checkbox to a dataset within a repeater.

Basically, when you click a checkbox (or multiple) I want the corresponding title of the checkbox to match the type heading when the repeater expands.

I have attached my current code and images for reference. Been trying for days and getting nowhere

Thanks in advance!!!

https://petegregory95.wixsite.com/website-1


$w.onReady(function () {
    $w("#checkbox1").onClick( (event) => {
 if ($w("#checkbox1").checked===true) {
            $w('#repeater1').expand()
        }
 else
        {
            $w('#repeater1').collapse()
        }
 
} );

    $w("#checkbox2").onClick( (event) => {
 if ($w("#checkbox2").checked===true) {
            $w('#repeater1').expand()
        }
 else
        {
            $w('#repeater1').collapse()
        }
 
} );

    $w("#checkbox3").onClick( (event) => {
 if ($w("#checkbox3").checked===true) {
            $w('#repeater1').expand()
        }
 else
        {
            $w('#repeater1').collapse()
        }
 
} );

} );

Like it seems, you have choosen a project which is too big for you, to handle it.

I would recommend you start with SIMPLE-CODING.

First learn how to work and how to code with REPEATERs.

Here in this forum you will find a lot of examples of REPEATER-CODING.
For example, type into the searchbar of this forum the name —> “Ajit” this user often play around with repeaters (i call him the REPEATER-BOY😁).

Take a look at his examples, which handles with repeaters.

  1. https://www.wix.com/corvid/forum/community-discussion/onclick-function-to-save-repeater-item-as-favourite/p-1/dl-5fd2531da4463b0017f15976-5fd2280b40673f001748b54b-2

  2. https://www.wix.com/corvid/forum/community-discussion/code-for-restricting-repeater-character-length-broken

  3. https://www.wix.com/corvid/forum/community-discussion/how-do-i-use-a-collection-field-in-the-url-of-a-repeater-item

And so on…

Perhaps, this little example here, helps you also to understand, how repeaters are working and how to code them…

https://russian-dima.wixsite.com/meinewebsite/repeater-dropdown