forms icon indicating copy to clipboard operation
forms copied to clipboard

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

Open juniwalk opened this issue 2 years ago • 0 comments

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.

juniwalk avatar Apr 27 '23 07:04 juniwalk