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

Unable to add class to input programatically when rendered using n:name #305

Open
juniwalk opened this issue Apr 27, 2023 · 0 comments
Open

Comments

@juniwalk
Copy link

Version: v3.1.11

Bug Description

I am trying to add class in definition to input rendered using n:name, however it does not happen. Am I trying to do something that is not possible? I checked code in Bridges/FormsLatte and it looks like it should work. I was unable to determine which method gets called, looked like none of them, to determine where the issue is.

Steps To Reproduce

$form->addSelect('client')->setHtmlAttribute('class', 'is-invalid');
<div class="form-group">
	<label n:name="client" class="control-label">{_web.order.client}</label>
	<select n:name="client" class="form-control select2 ajax"></select>
</div>

Expected Behavior

I'd expect, that class is-invalid would be added to the input on render.

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