mardi 30 août 2016

checked box value is undefined in request object

I'm submitting this from using EJS to server and getting all values except the check box value which is undefined when is receive request object

                 <form method="post" action="">

                        <div class="form-group">

                         <label for="title">Title:</label>

                        <input type="text" name="title" class="form-control" id="title" placeholder="Enter Artical Name"></div>

                    <div class="form-group">
                      <label for="email">Email:</label>
                      <input type="email" name="email" class="form-control" id="email" placeholder="Enter email">
                    </div>

                    <div class="form-group">
                      <label for="content">Artical Content:</label>
                      <textarea class="form-control" rows="5" name="artical" id="comment"></textarea>
                    </div>

                    <div class="checkbox">
                      <label><input type="checkbox" value="1" name="active" checked="true"> Published or Not Published</label>
                    </div>

                    <button type="submit" class="btn btn-default">Submit</button>
                  </form>




Aucun commentaire:

Enregistrer un commentaire