Most of the time I just wish to have all placeholders equal to the verbose name of the field defined in my models
I've added a mixin to easily do this to any form that I create,
class ProductForm(PlaceholderMixin, ModelForm):
class Meta:
model = Product
fields = ('name', 'description', 'location', 'store')
And
class PlaceholderMixin:
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
field_names = [field_name for field_name, _ in self.fields.items()]
for field_name in field_names:
field = self.fields.get(field_name)
field.widget.attrs.update({'placeholder': field.label})