Hi there,
I have this in my forms.py:
class SubmissionForm(forms.Form):
molecule_file =
forms.FileField(validators=[FileExtensionValidator(settings.CONTENT_TYPES),
file_size], help_text="Required: Select a PDB, MDL or MOL2 file")
But I am failing to make it work in my submit.html template. Currently, I
am "hacking" with:
<p title="Required: Select a PDB, MDL or MOL2 file."><label>
{{form.molecule_file.label}}</label>{{ form.molecule_file }}</p>
That will show the tooltip "Required: Sel..." if mouse pause over this
field in the browser, but this is silly, I wish I could use something like:
<p title={{form.molecule_file.help_text}}><label>
{{form.molecule_file.label}}</label>{{ form.molecule_file }}</p>
But that is not working, neither any combination I tried with .title etc.
Any suggestion would be very much appreciated.
Many thanks in advance,
Alan
--
I'll cycle across Britain in 2018 for a charity, would you consider
supporting my cause? http://uk.virginmoneygiving.com/AlanSilva
Many thanks!
--
Alan Wilter SOUSA da SILVA, DSc
Senior Bioinformatician, UniProt
European Bioinformatics Institute (EMBL-EBI)
European Molecular Biology Laboratory
Wellcome Trust Genome Campus
Hinxton
Cambridge CB10 1SD
United Kingdom
Tel: +44 (0)1223 494588
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/CAEznbzmoK07JfXPp_MOvmYFe84a%3D5YiBQMEFJOtUsUzpjPjTGg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.