Reputation: 39
{% extends 'base.html' %}
{% load buttons %}
{% load static %}
{% load custom_links %}
{% load helpers %}
{% load plugins %}
{% block content %}
<form action = "add" method= "post" enctype="multipart/form-data" class="form form-horizontal" id="reportForm">
{% csrf_token %}
<div class="panel panel-default">
<div class="panel-heading">
<strong>Add Report</strong>
</div>
<div class="panel-body">
<table class="table table-hover report-body attr-table">
<tr>
<td>URL</td>
<td>
<input type="text" required="required" name="src">
</td>
</tr>
<tr>
<td>WIDTH</td>
<td>
<input type="number" required="required" name="width">
</td>
</tr>
<tr>
<td> HEIGHT</td>
<td>
<input type="number" required="required" name="height">
</td>
</tr>
<tr>
<td> NAME OF THE REPORT</td>
<td>
<input type="text" required="required" name="report_name" >
</td>
</tr>
</table>
<input type="submit">
</div>
</div>
</form>
{% endblock %}
i don't have the database for the checking the exiting record . Here is one problem in my from when the user click on the reload on top of the web page ...then same form with same record will generated again ...how to prevent this resubmition the form
Upvotes: 0
Views: 67
Reputation: 415
Try adding autocomplete = "off"
in every <input>
.
Eg: <input type="text" required="required" autocomplete = "off" name="src">
Note: Not all browsers may support it.
Upvotes: 1