Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <aura:component implements="flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction" access="global" >
- <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:attribute name="recordId" type="String" />
- <aura:if isTrue="{!v.showSpinner}">
- <lightning:spinner />
- </aura:if>
- <aura:if isTrue="{!!v.saved}">
- <lightning:recordEditForm
- onload="{!c.handleLoad}"
- onsubmit="{!c.handleSubmit}"
- onsuccess="{!c.handleSuccess}"
- objectApiName="Employee_Session__c"
- >
- <!-- the messages component is for error messages -->
- <lightning:messages />
- <lightning:inputField fieldName="Name" value="{!v.recordID.Name + ' MM/dd/yyyy'}"/>
- <lightning:inputField fieldName="Employee__c" value="{!v.recordId}" />
- *subsequent code removed as not needed.
- <aura:attribute name="nameUpdated" type="String" />
- <lightning:inputField fieldName="Name" value="{!v.nameUpdated}"/>
- onload : function(cmp,event,handler){
- var somedate = ' whatever you want to add';
- var name = cmp.get("v.nameUpdated");
- cmp.set("v.nameUpdated",name + somedate);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement