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

Forms/Input does not work properly, doesn't attach attributes #222

Open
doxigo opened this issue Dec 9, 2022 · 0 comments
Open

Forms/Input does not work properly, doesn't attach attributes #222

doxigo opened this issue Dec 9, 2022 · 0 comments

Comments

@doxigo
Copy link

doxigo commented Dec 9, 2022

Describe the bug
Looking at the _input.twig file and the forms.wingsuit.yml file, there seems to be some errors, the online demo also has the issue as well

the attributes section doesn't really get filled with placeholder, type and possibly value correctly.

If you inspect the checkbox or submit, for instance, you don't see the "type" there
Screenshot 2022-12-09 at 16 11 41

We can fix this by using .setAttribute('type', variant) and using fields for placeholder and value like so:

{% set attributes = attributes.addClass(classes)
.setAttribute('type', variant)
.setAttribute('placeholder', placeholder)
.setAttribute('value', default_input)
 %}

but I wonder if there's a better way to tackle this? ie. using settings as intended

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Forms/Inputs/Checkbox'

Expected behavior
Proper support of placeholder, type and possibly value

Also a side note I wonder if there's an easy way to access the settings values in twig? couldn't find any documentations on that

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