I’m trying to set the link of a button based on what appears in a text. The data in the text is obtained from a dataset. This is my current code, however, when I click on the button nothing seems to happen.
export function button2_click ( event ) {
let value = ( $w ( "#text103" ). text );
console . log ( value );
if ( value === "Employment Dispute" ) {
$w ( "#button2" ). link = "https://forms.gle/L6RvyX9Fsfe2Lz3d9" ;
} **else if** ( value === "Real Estate" ) {
$w ( “#button2” ). link = “https://forms.gle/D3fiFNAMJbaqhWicA” ;
}
}