Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation on markup modification #83

Open
helenb opened this issue Sep 11, 2024 · 0 comments
Open

Documentation on markup modification #83

helenb opened this issue Sep 11, 2024 · 0 comments

Comments

@helenb
Copy link
Member

helenb commented Sep 11, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant