How do i make this box appear?

Hi,

I’m currently trying to make a custom multistage form. I have a question on the form that requires a “Yes” or “No” answer (radio button). I want to make it so that if the user clicks “Yes” another text box appears, which i currently have set to hidden.

So basically when they click “Yes”, this text box appears to allow them to type another answer.

How do i do this in the code part?

Hey,
Lets say that you have two radio buttons:


The value of Yes is set to “true” and the value of No is set to false. You should add event listener to the radio buttons group:

$w.onReady(function () {
    $w('#radioGroup1').onChange(()=>{
         if(($w('#radioGroup1').value)){
            $w('#textboxId').show();
         }
         else{
            $w('#textboxId').hide();
         }           
    })
});

I hope it’s clear.

Best,
Tal.