<aura:component>
<lightning:recordEditForm
objectApiName="Account"
onload="{!c.handleCreateLoad}">
<lightning:messages />
<lightning:inputField aura:id="nameField" fieldName="Name"/>
<lightning:button class="slds-m-top_small" type="submit" label="Create new" />
</lightning:recordEditForm>
Set the field value in your client-side controller.
({
handleCreateLoad: function (cmp, event, helper) {
var nameFieldValue = cmp.find("nameField").set("v.value", "My New Account");
}
})
Form Display Density
If you find your Solution then mark this as the best answer.
Hi Henry,
If you find your Solution then mark this as the best answer.
Thank you!
Regards,
Suraj Tripathi