From 3d5576936592bd7f55bf148af9f8989932b6e12a Mon Sep 17 00:00:00 2001 From: "J.-S. Caux" <J.S.Caux@uva.nl> Date: Sun, 11 Nov 2018 20:46:07 +0100 Subject: [PATCH] Add placeholder to SelectTopicForm --- ontology/forms.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ontology/forms.py b/ontology/forms.py index 7f85b113c..ab23a61eb 100644 --- a/ontology/forms.py +++ b/ontology/forms.py @@ -16,6 +16,11 @@ class SelectTagForm(forms.Form): class SelectTopicForm(forms.Form): topic = AutoCompleteSelectField('topic_lookup', label='', help_text='') + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.fields['topic'].widget.attrs.update({ + 'placeholder':'type here to find topic'}) + class SelectLinkedTopicForm(forms.Form): topic = AutoCompleteSelectField('linked_topic_lookup', -- GitLab