function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Henry JohnHenry John 

how to get updated value from record edit form in controller at run time

Best Answer chosen by Henry John
Suraj Tripathi 47Suraj Tripathi 47

Hi Henry,

 
<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.

 

  Thank you!


  Regards,
  Suraj Tripathi