Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<aura:component>
<!--lightningRecEditFormComp-->
<aura:attribute name="disabled" type="Boolean" default="false" />
<aura:attribute name="saved" type="Boolean" default="false" />
<aura:attribute name="showSpinner" type="Boolean" default="true" />
<aura:if isTrue="{!v.showSpinner}">
<lightning:spinner />
</aura:if>
<aura:if isTrue="{!!v.saved}">
<lightning:recordEditForm
aura:id="createAccountForm"
onload="{!c.handleLoad}"
onsubmit="{!c.handleSubmit}"
onsuccess="{!c.handleSuccess}"
recordId="0017F00000RxUwTQAV"
objectApiName="Account">
<lightning:messages />
<lightning:inputField fieldName="Name" />
<lightning:inputField fieldName="AccountNumber" />
<lightning:inputField fieldName="Type" />
<lightning:inputField fieldName="Industry " />
<lightning:inputField fieldName="BillingStreet" />
<lightning:inputField fieldName="BillingCity" />
<lightning:inputField fieldName="BillingState" />
<div class="slds-m-top_medium">
<lightning:button disabled="{!v.disabled}" variant="brand" type="submit" name="save" label="Save" />
</div>
</lightning:recordEditForm>
<aura:set attribute="else">
<p>Saved!</p>
</aura:set>
</aura:if>
</aura:component>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.