title: Electron - get form data
body: <p>I'm new to Electron and wondering how to get data from a form to main.js ( main file that launches Electron ). The snippet from my index.html file is below: </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>    &lt;form id="creds"&gt;
         &lt;h3 class="username"&gt;Username&lt;/h3&gt;
          &lt;input id="username" class="form-control text-input" placeholder="Username"&gt;
          &lt;input type="submit" value="Submit"&gt;
      &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I read about ipcMain and ipcRenderer but I'm unable to figure out what code to use to get the data from index.html after I hit the Submit button </p>