Skip to content

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

Description

@juniwalk

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions