function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Leonardo JimenezLeonardo Jimenez 

enable or disable lighnting button based on text value

Hi. I have the following form:

Lightning FormThe form has a button that retrieves data from an API and displays it in the fields of that form. I need that the entries that are "unknown" can be modified, the others that are disabled so the user cannot modify them.
User-added image
it should look like this:

User-added imageTThanks
Ashish Singh SFDCAshish Singh SFDC
Hi Leonardo Jimenez,

You can use aura:if tag and on your input field tag you can choose disabled markup.

I would suggest to check for the below links:

https://developer.salesforce.com/docs/component-library/bundle/aura:if/specification
https://developer.salesforce.com/docs/component-library/bundle/lightning:inputField/specification
http://www.sfdcpoint.com/salesforce/auraif-tag-lightning-component-example/
https://salesforce.stackexchange.com/questions/236917/conditional-rendering-in-lightning-component-with-more-than-auraiftrue-else

Hope it will help you out.

Thanks,
Ashish Singh.