1

I am customizing the RegistrationForm from django-registration-redux with django-crispy-forms. For that I have defined a FormHelper which is working fine:

class MyRegistrationForm(RegistrationForm):

    def __init__(self, *args, **kwargs):
        super(MyRegistrationForm, self).__init__(*args, **kwargs)
        helper = self.helper = FormHelper()
        # Moving field labels into placeholders
        layout = helper.layout = Layout()
        for field_name, field in self.fields.items():
            layout.append(Field(field_name, placeholder=field.label))
        helper.template_pack = 'bootstrap3'
        helper.form_show_labels = False

My form is shown as I want: no labels, bootstrap3 and placeholders derived from label.

Now I would also like to suppress the help_text, which is coming from the Field definition. There is a somehow related flag here (help_text_inline), but that is not intended to disable the display of the help text. I can not find a flag to completely disable the display of the help text in the FormHelper documentation. Is this at all possible?

Removing the help text from the Field definition is not really an option, since I am inheriting the RegistrationForm and I do not want to modify it too much.

blueFast
  • 41,341
  • 63
  • 198
  • 344

0 Answers0