Skip to content

Documentation on markup modification #83

@helenb

Description

@helenb

Following a discussion on some of the pain points for front-end devs, we agreed that we need some more documentation with examples of how to solve common scenarios to modify the markup and classes on a form. We agreed that while this might duplicate some of the crispy forms documentation, that is often hard to follow.

The kinds of things that need documenting include, but are not limited to:

  • How to add a Layout class
  • How to add a custom CSS class to an input, label, error message, help text or wrapper element
  • How to remove a CSS class from any of the above (assuming we go ahead and add that functionality)
  • How to add a data attribute to an input, label, error message, help text or wrapper element
  • How to add a wrapper around a group of fields
  • How to use a custom template for one particular field
  • How to use a custom template for the whole form
  • How to use a custom template for all fields of the same type in the form
  • How to use a custom template for all fields of the same type across a project
  • Alternative approaches to the above, e.g. using a custom widget and bypassing tbxforms for special field cases
  • How to add some arbitrary HTML to a form
  • How to group fields in fieldsets

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions