Fórum

auto fields issue in liferay 7 GA2 ?

lokesh gorrela, modificado 7 Anos atrás.

auto fields issue in liferay 7 GA2 ?

Regular Member Postagens: 173 Data de Entrada: 09/03/16 Postagens Recentes
Hi guys,

I created a form by using auto fields in liferay 7. see the belwo code.

<aui:form name="fm" method="POST" action="<%=addMemberURL.toString()%>" >
<div id="member-fields">
<div class="lfr-form-row lfr-form-row-inline">
<div class="row-fields" style="display: flex;">
<aui:input fieldParam='firstName1' id='firstName1' name="firstName1" label="First Name" />
</div></div></div>
<aui:button type="submit"/>
</aui:form>

<aui:script>
AUI().use('liferay-auto-fields',function(A) {
new Liferay.AutoFields(
{
contentBox: '#member-fields',
fieldIndexes: '<portlet:namespace />rowIndexes'
}
).render();
});
</aui:script>


After form creation I tested below scenarios:
Scenario-1:
I click on Add button(Increment) and I taken 4 fields after that I filled 4 fields and click on save button, data stored in db successfully.
Scenario-2:
I click on Add button(Increment) and I taken 3 fields after that I filled 3 fields then after I click on remove button(Decrement) and removed one field from 3 fields. After that I click on save button, three fields data is stored. Actually store only two fields data in database because we removed one field from three fields. So this is problem in scenario-2.

How to resolve problem in scenario-2. Anyone knows about this please give replay to me.

Thanks
With Regards
Lokesh