Как добавить placeholder к инпутам?
Файл forms.py
from django.forms import ModelForm
from .models import Question
class QuestionForm(ModelForm):
class Meta:
model = Question
fields = '__all__'
Файл models.py
from django.db import models
class Question(models.Model):
name = models.CharField(max_length=100)
phone = models.CharField(max_length=20)
mail = models.CharField(max_length=200)
question = models.TextField()
def __str__(self):
return self.name
Файл index.html
<form action="" method="POST">
{% csrf_token %}
<div class="row">
<div class="col-lg-6">
<p class="input-field">
{{ form.name }}
</p>
<p class="input-field">
{{ form.phone }}
</p>
<p class="input-field">
{{ form.mail }}
</p>
</div>
<div class="col-lg-6">
<p class="input-field">
{{ form.question }}
</p>
<p class="input-field">
<button type="submit" class="send-qtn">Отправить <i class="far fa-paper-plane"></i></button>
</p>
</div>
</div>
</form>