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

Patterns based input mode elements do not have an id #196

Open
ewohnlich opened this issue Mar 5, 2024 · 0 comments
Open

Patterns based input mode elements do not have an id #196

ewohnlich opened this issue Mar 5, 2024 · 0 comments

Comments

@ewohnlich
Copy link

For example, the effective date (datetime-picker patter) or subjects(tags) field (select2 pattern). Without an id the associated labels do not match.

Can we give them an id just based on their name? widgets/patterns.py BaseWidget:

    def update(self):
        """Updating pattern_options in element `data-*` attribute."""
        self.el.attrib['id'] = self.name.replace('.', '-')
        if self.pattern_options:
            self.el.attrib["data-" + self._klass_prefix + self.pattern] = json.dumps(
                self.pattern_options
            )
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