javascript - Django: How to get Form field descriptions to show inside the text/entry box and not outside of it? (pic inside) -


I have many variations in the Django project and when it appears as a form descriptor it will be more of a design gray gray text The entries were disappeared inside the box and as the user started entering the text in the box. I'm not sure how to go about doing this, but I'm guessing it jquery / js? Is there any other underlying degenerative ways to do this, which I'm not seeing? If not, what is the best way to go about doing this in JS? The picture below I mean, notice is a quick text within the entrance box of the toolbars like Facebook Search, whereas the link entry in my app is outside the form box.

In advance thanks

@team is correct, Placeholder is a feature inside the input tag, Django allows you to use the placeholder feature, for example: Example from the Django import forms category:

  Example (form.form): Name = forms.CharField (label = 'name', widget = forms.TextInput (attrs = {'Placeholder': 'Please enter your name'}))  

This placeholder attribute Will join Paco will tell you exactly what you will tell.


Comments