Cleaning up the add/edit note form

The next major glaring problem is the form for adding and editing notes. As we said earlier, it's easy to get the text input area to overflow a small screen. On the other hand, Bootstrap has extensive support for making nice-looking forms that work well on mobile devices.

Change the form in views/noteedit.hbs to this:

<form method='POST' action='/notes/save'>  <div class="container-fluid">    {{#if docreate}}      <input type='hidden' name='docreate' value="create">    {{else}}      <input type='hidden' name='docreate' value="update">    {{/if}}    <div class="form-group row align-items-center">      <label for="notekey" class="col-1 col-form-label">Key</label>      {{#if docreate }}        <div class="col"> <input type='text' class="form-control" ...

Get Node.js Web Development - Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.