Message Boards

How to prevent AUI from wrapping input tags in extra div?

L Winchester, modified 4 Years ago.

How to prevent AUI from wrapping input tags in extra div?

Junior Member Posts: 50 Join Date: 9/21/16 Recent Posts
Have posted in AUI forum but not had any responses. Hoping someone here can help.

According to the docs for 7.0, https://docs.liferay.com/ce/portal/7.0-latest/taglibs/util-taglib/aui/input.html ,  the wrappedField attribute does this: "Whether to wrap the input component in a div, that can be styled. The default value is false . If the wrapperCssClass  attribute is configured, the value is set automatically to true ."

Our JSP file includes: 

<div class="col-sm-4">
    <aui:input cssClass="input" wrappedField="<%= false %>" name='%= "firstName_" + i %>' id='<%= "firstName_" + i %>' type="text" placeholder="First Name" label="" value="<%= firstName %>" />
</div>

The resulting HTML continues to be:

<div class="col-sm-4">
    <div class="form-group input-text-wrapper">
        <input class="field input form-control" id="_firstName_0" name="_firstName_0" placeholder="First Name" title="first-name_0" type="text" value="">
    </div>


</div>

An extra wrapping div with classes form-group and input-text-wrapper is created. But the docs state that the default should be no wrapping div. We have even added wrappedField="<%= false %>" for good measure -- but it has no effect.
I would so appreciate someone telling me if it is in fact possible to have an aui input tag without the addition of a wrapping div, and if so how is it achieved?
L Winchester, modified 4 Years ago.

RE: How to prevent AUI from wrapping input tags in extra div?

Junior Member Posts: 50 Join Date: 9/21/16 Recent Posts
ANYONE? Is there anyone who can answer this question?
​​​​​​​
Should we just give up on AUI completely? There seems to be no support for it at all, and it doesn't seem to do what the docs say it should do...