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

Allow changing the label markup #68

Closed
1 of 4 tasks
zerolab opened this issue Mar 19, 2024 · 2 comments · Fixed by #78
Closed
1 of 4 tasks

Allow changing the label markup #68

zerolab opened this issue Mar 19, 2024 · 2 comments · Fixed by #78

Comments

@zerolab
Copy link
Member

zerolab commented Mar 19, 2024

While tbxforms marks optional labels with "(required)", we had requests to stick to the asterisk denoting required fields.

At the moment that is not possible unless one overrides the whole field.html or use JS.

Can we:

  • add a required class to all labels for required fields (or optional fields marked as required) e.g. tbxforms-label--required
  • allow passing additional classes to labels, or the wrapping container (I guess that is covered by I would like to be able to add my own class to a label #26. One can pass label_class to the Field definition, h/t @siimonevans). Although in our case it can be tedious to have to specify each field
  • make the label and include that is easier to override in isolation?
  • optionally have TBXFORMS_REQUIRED_LABEL_MARKER settings, defaulting to an empty string?
@siimonevans
Copy link
Member

Yes please! Without this I've found I've had to write gnarly CSS (and/or JS) which feels unnecessary.

@kbayliss
Copy link
Collaborator

Solved by #78

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

Successfully merging a pull request may close this issue.

3 participants