I have a form on my site, which contains a dropdown with a list of all the countries in the world.
I have managed to add some code that when the United Kingdom shows, the submit button is visible, but any other country and the submit button hides and a small piece of text appears.
I'm now ready to accept the form from different countries, so need to add their value to the code, but what I have tried isn't working
Here's the code:
export function countries_change(event) {
if ($w('#countries').value === 'United Kingdom (UK)') {
$w('#submit').show();
$w('#text57').hide();
} else {
$w('#submit').hide();
$w('#text57').show();
}
}
Basically, I want to be able to add more countries to show the submit button such as New Zealand, Canada, United States etc.
Any help is appreciated
Have an array of country values (for submission)
then:
if(contryValueArray.includes($w('#countries').value)){ //.... }