Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. <aura:component implements="flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction" access="global" >
  2. <aura:attribute name="disabled" type="Boolean" default="false" />
  3. <aura:attribute name="saved" type="Boolean" default="false" />
  4. <aura:attribute name="showSpinner" type="Boolean" default="true" />
  5. <aura:attribute name="recordId" type="String" />
  6. <aura:if isTrue="{!v.showSpinner}">
  7. <lightning:spinner />
  8. </aura:if>
  9. <aura:if isTrue="{!!v.saved}">
  10. <lightning:recordEditForm
  11. onload="{!c.handleLoad}"
  12. onsubmit="{!c.handleSubmit}"
  13. onsuccess="{!c.handleSuccess}"
  14. objectApiName="Employee_Session__c"
  15. >
  16. <!-- the messages component is for error messages -->
  17. <lightning:messages />
  18. <lightning:inputField fieldName="Name" value="{!v.recordID.Name + ' MM/dd/yyyy'}"/>
  19. <lightning:inputField fieldName="Employee__c" value="{!v.recordId}" />
  20.  
  21. *subsequent code removed as not needed.
  22.  
  23. <aura:attribute name="nameUpdated" type="String" />
  24. <lightning:inputField fieldName="Name" value="{!v.nameUpdated}"/>
  25.  
  26. onload : function(cmp,event,handler){
  27. var somedate = ' whatever you want to add';
  28. var name = cmp.get("v.nameUpdated");
  29. cmp.set("v.nameUpdated",name + somedate);
  30.  
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement