Can someone help me with this line of code as I am still new to Development and learning it. On the below lightning component code, the default value shows as "Call" and now the business needs the default value as "GoTo Meeting". I was told instead of changing the order of the lines on the code we can add a default tag to set it.

<lightning:Select name = "recalsend" label = "Meeting Type" required = "true" value = "{! v.meetingType }">    
                    <option value="Call">Call</option>
                    <option value="Onsite Visit">Onsite Visit</option>  
                    <option value="GoToMeeting">GoToMeeting</option>

The default value need to be GOTO Meeting instead of Call Option. How can i explicitly define here?

Many Thanks!!!

  • 2
    P.S. Pay attention to your code. <lightning:Select is incorrect, it should be <lightning:select. JavaScript is cAsE-sEnSiTiVe, so a single mixup can cause things to break.
    – sfdcfox
    Mar 11, 2021 at 16:13

1 Answer 1


Set the default value of meetingType to be GoToMeeting. Like below

<aura:attribute name="meetingType" type="String" default="GoToMeeting"/>
  • 1
    @AmandaGreen It needs to be in the same component, somewhere above the code you wrote. It's traditional to write attributes at the top of the component.
    – sfdcfox
    Mar 11, 2021 at 16:11
  • @Menachem Shanowitz: thanks for the reply. I was able to make it work as you mentioned. thanks a lot :) Mar 11, 2021 at 16:32

You must log in to answer this question.

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