I would like to get the value from my custom dialog (HTML) to use it as a string parameter to a function.
Dialog.html:
   <form id="subject-form">
    <div class="form-inline">
      <input type="text" id="subject" placeholder="Bookmark name" name="subject" maxlength="16" required >
      <span>.</span>
      <div class="select-dropdown">
        <select id="selector">
          <option value="student">student</option>
          <option value="cs">cs</option>
          <option value="hr">hr</option>
        </select>
      </div>
      <span>.xyz.com</span>
    </div>
    <div class="btn-container" id="dialog-button-bar">
      <button type="submit" class="action" onclick="getLabel()">Add</button>
      <button id="dialog-cancel-button" onclick="google.script.host.close()">Cancel</button>
    </div>
    <!-- <div id="dialog-status"></div> -->
  </form>
DialogJS:
  function getLabel () {
    const subj = document.getElementById('subject').value;
    const subd = document.getElementById('selector').value;
    google.script.run
    .withSuccessHandler()
    .mailIt(subj, subd);
  }