title: How do I make a text box appear after selecting an option from a drop-down menu in SuiteScript?
body: <p>I am new to SuiteScript. Right now I am trying to make a form using a Suitelet. In this form I want to add logic to the Suitelet where if a user selects an option from a dropdown menu, then that option will make a textbox appear for the user to enter more details in that selection. Here is my code so far.</p>
  
  <pre><code>function suitelet(request, response) {
  
      //create form
      var form = nlapiCreateForm('Form Title');
  
      var a = 'a';
      var b = 'b';
      var other = 'Other';
  
      // adds dropdown menu
      var selectField = form.addField('custpage_menu', 'select', 'Random Dropdown Menu');
      selectField.addSelectOption('', '', false);
      selectField.addSelectOption(a, a, false);
      selectField.addSelectOption(b, b, false);
      selectField.addSelectOption(other, other, false);
      selectField.setMandatory(true);
  
      //render a button for the user to submit form
      form.addSubmitButton('Submit');
  
      //load form
      response.writePage(form);
  }
  </code></pre>
  
  <p>I would like the text box to appear when the user selects the option "Other". So in this case, the code line <code>selectField.addSelectOption(other, other, false);</code> represents the selection option labeled as "Other". This selection happens before the user clicks the submit button, so I don't think any POST requests are happening at this point. </p>
  
  <p>I am not exactly sure what kind of event fires whenever a user selects an option from a dropdown menu. If I can capture that event through my code, then my hope is that I should be able to make a text box appear based on the selection.</p>
  
  <p>EDIT: I forgot to mention one thing. I am not working with records at all. This is just a pure form that is generated by a Suitelet.</p>