Any saved record is already populated and If I edit some field and again click on save button then that record should not be changed. So I want to disable that fields once a record is saved.
Through this condition you can disabled the lightning input but you have to set 'visibileInputBox' attribute value false in controller of saved button.
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too. Thanks, Ajay Dubedi
Take a Boolean type attribute which you need to set True if the record is saved. use in input as given below I hope this will help you
Regards
Ashif
You need to handle in JS controller as per your requirement.
COMPONENT:
<aura:component controller='etc' implements="forceCommunity:searchInterface">
<aura:attribute name="visibileInputBox" type="Boolean" default="true" />
<aura:if isTrue="{! v.visibileInputBox }">
<lightning:input type="text" label="Name" name="Name"/>
</aura:if>
</aura:component>
Through this condition you can disabled the lightning input but you have to set 'visibileInputBox' attribute value false in controller of saved button.
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi