You need to sign in to do that
Don't have an account?
Mars Rover 1489
Lightning Component - Picklist Field with Ability to write free text
I need to override standard Create and Edit Actions on Account object with Lightning Component. Is there a way or a type of field that we could cover the following requirement? Have a field with some predifined values but letting user if he wants to enter free text. I would actually like something like Subject field on Task object but i cannot find any way to implement it. Any ideas please ?
Example: I have a picklist field for Citizenship that has some values for Countries (England, Germany, France, ...etc...). But i want to let user enter his own value (for example: German). i have tried using the following but without success:
Example: I have a picklist field for Citizenship that has some values for Countries (England, Germany, France, ...etc...). But i want to let user enter his own value (for example: German). i have tried using the following but without success:
<!--05/09/2019 George Galaios: Code for Iteration Picklist: Citizenship --> <lightning:select aura:id="accCitizenship" label="{!$Label.c.ea_citizenship}" value="{!v.accountRecord.ea_Citizenship__c}" disabled="{!and(v.noExtraPermission, v.noPermAndCleansed)}" class="slds-size--1-of-2 slds-p-horizontal_x-small"> <aura:iteration items="{!v.ea_Citizenship_Values}" var="item"> <option value="{!item}" selected="{!item==v.accountRecord.ea_Citizenship__c}">{!item}</option> </aura:iteration> </lightning:select> <!-- End of Code for Iteration -->
All Answers
can you please share your code?
sure. Please find code below:
Component:
Controller
Helper:
Style
Apex Controller
Apex Conroller Test Class