How can I make a lightbox appear (when a form is submitted) only when specific criteria are met on the form?

What do say the console?

import wixWindow from 'wix-window';

export function submitbtn_click(event) {console.log("Submit-Clicked")
  let newValue = $w("#dropdown1").value;
  console.log("newValue: ", newValue)
  
  if (newValue === "5 Stars - Excellent") {console.log("IF-running")
      wixWindow.openLightbox("Review Us");
  }
  else {console.log("ELSE-running")}
}