I'm making a lightning component with a lightning:recordEditForm and lightning:inputField to edit Contact records.
<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId,lightning:actionOverride,force:lightningQuickAction">
<aura:attribute name="contact" type="String" />
<aura:attribute name="fieldsContact" type="String[]" />
<aura:attribute name="goSubmit" type="Boolean" />
<aura:handler name="change" value="{!v.goSubmit}" action="{!c.goSubmitGo}"/>
<aura:registerEvent name="sendResult" type="c:SMB_Opportunity_Update_Information_Evt"/>
<div>
<lightning:recordEditForm aura:id="updateContact" objectApiName="Contact" recordId="{!v.contact}" onerror="{!c.handleError}" onsuccess="{!c.handleSuccess}" >
<aura:iteration items="{!v.fieldsContact}" var="item">
<lightning:inputField aura:id="{!item}" fieldName="{!item}" />
</aura:iteration>
</lightning:recordEditForm>
</div>
I use a list of String to populate my input fields. Everything works fine when I try to submit my form excepted for the Salutation Field. First of all, it won't display. I already find a workaround by adding this:
<div style="display:none">
<lightning:inputField fieldName="Name"/>
</div>
at the beggining of my Record Edit Form. But even if I can choose a value for this field, it does not update when I submit my form. All the others fields update well.
Do you know why and if there is a workaround?