Give a Text Field Same Value as Another Text Field

I need an if statement that will cause a text field to equal another text fields value if a certain number is in a text field.

So if Text1 is equal to “1” then Text2 will be the same a the value in Text3

I figured it would look something like this

if (text1 === 1 ) {
$w( “#text2” )===$w( “#text3” );
}

Is this possible, I am new to Corvid. So any help will be greatly appreciated. Thank you

Try:

if ($w("#text1").text === "1") {         
 $w("#text2").text = $w("#text3").text;
 }

 

Works perfectly thank you!!