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

Atrributes without value #87

Open
nikuscs opened this issue Sep 18, 2019 · 3 comments
Open

Atrributes without value #87

nikuscs opened this issue Sep 18, 2019 · 3 comments

Comments

@nikuscs
Copy link

nikuscs commented Sep 18, 2019

I believe its not possible to add attributes to a field without value.
I can push a PR to fix this issue if necessary.

Example :

<select id="select" class="show-tick form-control" name="multipleSelect" multiple>

@JamesPoel
Copy link

JamesPoel commented Apr 1, 2020

You can use select(...)->multiple() for your example.

@indigitpt
Copy link

In case of multiple yes, but how about other attributes without value ? Ex : selectable for usage with 3rd Party javascript.

@JamesPoel
Copy link

JamesPoel commented Apr 1, 2020

In case of multiple yes, but how about other attributes without value ? Ex : selectable for usage with 3rd Party javascript.

If you set the value to true, it will add the attribute to the element with no value.

select(...)->attrs(['data-custom-attribute' => true])
<select data-custom-attribute ...>...</select>

Similarly, if you set the value to false, the attribute will not be added.

Hope that helps!

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

2 participants