jazzband / jazzband/django-floppyforms

Form Layouts - change row template based on field type

Open
#80 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
836
Forks
150
PR merge metrics
No merged PRs in 30d

Description

I'm really liking floppyforms but there's one thing I haven't figured out, even after reading the source.
I want to be able to use a generic form layout that can use different row templates for different widget types (or have type in the context for the row template to do conditionals). The use case for this is where the label's relationship to the field might be different.

e.g. a BooleanField should generate the following row code (bootstrap style)

``` HTML


Remember me

```

instead of

``` HTML
Remember me:




```

which would otherwise be fine for a text input.

If I missed something give me a clue and I'll write up a pull request for the documentation when I've got it worked out. Otherwise I would like to make a feature request.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.