form submission button

Hello, I have managed to create a multi page form using a slide and button disable feature, as per this persons ingenious post.

Everything is working correctly, the slide will not move to the next page before all sections are complete. However, on the final slide and on submission when the submit button is clicked, I would like one more slide to show my submission message. the code is the same for all slides but when the submit button is clicked, I can get it to move to the last slide. My guess is that because this final button is linked to a dataset as the submission button, its is overriding my code to move to the next slide. my code is below, specifically #button9 is my submission button. any ideas?

thanks in advance

export function button7_click(event, $w, reject) {
if ($w(‘#input8’).value > 1000 && $w(‘#input9’).value > 1000) {
$w(‘#slideshow2’).changeSlide(1);
} else {
$w(‘#button7’).disable()

    setTimeout( function  () { 
        $w('#button7').enable() 

    }, 2000) 

} 

}
export function button8_click(event, $w, reject) {
if ($w(‘#dropdown14’).value !== ‘’ && $w(‘#dropdown16’).value !== ‘’ && $w(‘#dropdown13’).value !== ‘’ && $w(‘#dropdown15’).value !== ‘’) {
$w(‘#slideshow2’).changeSlide(2);
} else {
$w(‘#button8’).disable()

    setTimeout( function  () { 
        $w('#button8').enable() 

    }, 2000) 
} 

}

export function button9_click(event, $w, reject) {
if ($w(‘#dropdown17’).value !== ‘’ && $w(‘#dropdown18’).value !== ‘’ && $w(‘#input10’).value && $w(‘#input11’).value && $w(‘#input12’).value && $w(‘#input13’).value && $w(‘#input14’).value && $w(‘#checkbox2’).value !== ‘’) {
$w(‘#slideshow2’).changeSlide(3);
} else {
$w(‘#button9’).disable()

    setTimeout( function  () { 
        $w('#button9').enable() 

    }, 2000) 
}

are all your IF conditions being met ?

try temporally removing your IF conditions and see if the button fires

Hi Mike, thanks for your reply.

I’ve tried to research, but what are IF conditions? sorry I’m a bit of a beginner

thanks

@runk40

temporally remove this:

if ($w(’ #dropdown17 ‘).value !== ‘’ && $w(’ #dropdown18 ‘).value !== ‘’ && $w(’ #input10 ‘).value && $w(’ #input11 ‘).value && $w(’ #input12 ‘).value && $w(’ #input13 ‘).value && $w(’ #input14 ‘).value && $w(’ #checkbox2 ').value !== ‘’) {

@mikemoynihan99 ok I will see, the button was working, i think prior to adding the #checkbox2

i will have a play, thanks for your time

@mikemoynihan99 so it seems to be a specific issue with the $w(’ #checkbox2 ').value !== ‘’)

basically the tick box needs to be ticked for the button to work, although my form does submit.
Rather than “value” should this be something like “checked” or “Boolean”

any ideas on the correct suffix for #checkbox2

thanks again for you input

@runk40

$w(’ #checkbox2 ').checked

@mikemoynihan99 yep, I answered my own question, that worked!

really appreciate your time. thanks