title: What is the best way to generate a dynamic html form, using ejs, that is triggered by an option select element?
body: <p>You can choose option a,b,c,d. If you choose option b,&quot;Have a beautiful day!&quot; will appears.</p>
  <pre><code>&lt;div class=&quot;main-div&quot;&gt;
      &lt;optgroup label=&quot;Select an option&quot;&gt;
          &lt;select name = &quot;dropdown&quot; class=&quot;dropdown1&quot; id=&quot;selectOption&quot; placeholder=&quot;Choose&quot;&gt;
              &lt;option value = &quot;a&quot; selected&gt;a&lt;/option&gt;
              &lt;option value = &quot;b&quot;&gt;b&lt;/option&gt;
              &lt;option value = &quot;c&quot;&gt;c&lt;/option&gt;
              &lt;option value = &quot;d&quot;&gt;d&lt;/option&gt;
          &lt;/select&gt;
      &lt;/optgroup&gt;
  &lt;/div&gt;
  </code></pre>
  <p>How to set valueOption ('a', 'b','c', or 'd') so to use the following code?</p>
  <pre><code>&lt;% if (valueOption === 'b') { %&gt;
      &lt;h2&gt; Have a beautiful day! &lt;/h2&gt;
  &lt;% }%&gt;
  </code></pre>