I would like to put some help text in this form.
class ItemForm(forms.ModelForm):
alternative_id = forms.CharField(max_length = 60, required = False, help_text = 'Valid wildcard search is in the format *XX, *XX*, XX*')
However it does not appear on the page. Is it because I may need a template tag somewhere?
EDIT: I have this written in my template.
<div id="location_header">Search for Items</div>
<div id="form_container">
<form action="." method="post">
<fieldset class="model">
{{ form.as_p }}
{{ alternative_id.help_text }}
</fieldset>
<div id="form_footer">
<input type="submit" value="Search" >
</div>
</form>
</div>
Help text still does not appear. Is there a way to write a help text, while allowing django to generate a form?
Putting
{{ form.as_p }}(or just{{ form }}) in your template should display the help_text without additional code, provided that you haveformin your context (but I suppose you do if you get the field on your page).