I am creating a form in which a user selects an event from a <select> menu and if the event is password protected, a code box will appear below.

The problem is that the list is generated from the server on a mysql page. What I am trying to do is make the box appear only if it is password protected. My first idea was to set the value of the protected options to "protected" or something similar, but this won't work as I will lose the value it is supposed to be.

Is there a way this can be done? Thanks!