Skip to main content
Participant
Sep 13, 2023 7:36 PM UTC
Question

SyntaxError: syntax error 4 at line 5

I'm trying to make a dependent drop down, I dont want to add anymore options until I get this error straightened out.

 

 

This topic is closed to new replies. Start a new post to keep the conversation going.

4 replies

Nesa Nurani
Community Expert
Community Expert
Sep 14, 2023 4:35 AM UTC

You have few errors, 'colon' should be used after statement, not after 'case':

case: '18.XX GENESEE' should be   case '18.XX GENESEE':

and case: 'Choose an option' should be    case 'Choose an option':

Also add 'break' in the last statement or use:

default:
f.clearItems();

 

Translate
Participant
Sep 14, 2023 11:55 AM UTC

After moving the colon it and correcting the one quotation this went through, thank you for your help.

Translate
try67
Community Expert
Community Expert
Sep 13, 2023 10:00 PM UTC

You must only use straight quotes, not curly ones, like after "BERGEN" in the code above (and maybe elsewhere, too).

Translate
Participant
Sep 14, 2023 11:54 AM UTC

Thank you, I thought I had fixed them all but it starts to blend after looking at it for so long.

Translate