{% extends 'base.html' %}
{% block content %}

<div class="row">
    <div class="col-md-6 grid-margin stretch-card">
      <div class="card">
        <div class="card-body">
          <h4 class="card-title">Add Subcategory</h4>
         <hr>
          <form class="forms-sample" method="POST" action="{% url 'add_subcategory' %}">
            {% include 'includes/messages.html' %}
            {% csrf_token %}
            <div class="form-group">
              <label for="exampleInputUsername1">Select Category Name</label>
              <select name="cat_id" class="form-control" required="true">
              
                <option value="">Select Category</option>
                {% for i in category %}
                 
                <option value="{{i.id}}">{{i.catname}}</option>{% endfor %}
              </select>
            </div>
            <div class="form-group">
                <label for="exampleInputUsername1">Subcategory Name</label>
                <input type="text" placeholder="Enter Subcategory Name"  name="subcatname" class="form-control" required="true">
              </div>
          
           
            <button type="submit" class="btn btn-primary mr-2">Add</button>
            
          </form>
        </div>
      </div>
    </div>
    </div>
    {% endblock %}