Related to a previous question but with a reproducible example, i just can't seem to set the value of any picklist fields when using lightning:inputField, any ideas?


<aura:component implements="flexipage:availableForRecordHome, force:hasRecordId">
    <div class="slds-p-bottom_large slds-p-left_large" style="width:500px">
        <lightning:recordEditForm aura:id="recordViewForm" 
            <lightning:messages />
            <lightning:inputField fieldName="FirstName" />
            <lightning:inputField fieldName="LastName" aura:id="lastname"/>
            <lightning:inputField fieldName="Birthdate" />
            <lightning:inputField fieldName="Phone" />
            <lightning:inputField fieldName="Country__c" aura:id="Country__c"/>
            <lightning:button label="Update" variant="brand" onclick="{!c.update}"/>


    update: function(component, event, helper) {
        component.find("Country__c").set("v.value", "Ireland");

  • 1
    <lightning:inputField fieldName="LeadSource" aura:id="LeadSource" value=""/>
    – Ysr Shk
    Commented Jun 1, 2018 at 11:16
  • 1
    ^Adding value attribute to the picklist will work with the same code.
    – Ysr Shk
    Commented Jun 1, 2018 at 11:17
  • 1
    @YsrShk that worked! if you add it as an answer i'll accept it
    – paul
    Commented Jun 1, 2018 at 21:48
  • Paul, can you edit your original question with this example data please? Never mind - I did it. Add the answer and I will delete this question. Commented Jun 2, 2018 at 0:51

1 Answer 1


<lightning:inputField fieldName="LeadSource" aura:id="LeadSource" value=""/>

Please add an Value attribute to the inputfield component.

Not the answer you're looking for? Browse other questions tagged .