Add placeholder value

This commit is contained in:
redfast00 2020-07-24 23:33:11 +02:00
parent 261f1c215a
commit 423ee4d9d9

View file

@ -1,5 +1,5 @@
from django.contrib.auth.forms import UserCreationForm, UserChangeForm
from django.forms import ModelForm
from django.forms import ModelForm, TextInput
from .models import CustomUser
@ -19,4 +19,8 @@ class CustomUserChangeForm(UserChangeForm):
class UserMetaForm(ModelForm):
class Meta:
model = CustomUser
fields = ['student_number', 'real_name']
fields = ['real_name', 'student_number']
widgets = {
'real_name': TextInput(attrs={'placeholder': 'Robbe Van Herck'}),
'student_number': TextInput(attrs={'placeholder': '001700000'})
}