• Mishu Bhat
  • NEWBIE
  • 15 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 2
    Replies
Hi,

I want to show the 'SuppliedEmail' field on the form when the picklist value of 'Investigation_Email_Preference__c' is either "abc" or "def".

How do i do that with lightning:recordForm ?

Component:
<aura:component implements="flexipage:availableForAllPageTypes,force:lightningQuickActionWithoutHeader,force:hasRecordId">
<aura:attribute name="myFields" type="List" default="['Case_Investigation__c','Investigation_Subject__c','Investigation_Email_Preference__c','Tier2_Agent__c','SuppliedEmail']"/>
<lightning:recordForm
        recordId="{!v.recordId}"
        objectApiName="Case"       
        columns="2"
        fields="{!v.myFields}"
        mode="edit"
        onsubmit="{!c.handleSubmit}"/>

</aura:component>
I need the Search section and Result section to be in the same line but for some reason the result section is higher than the search section by few pixels.(attached is the screenshot)User-added image


.accordionHeader { background: #1797c0; color: white; cursor: pointer; font: 10px Helvetica, Arial, sans-serif; line-height: 25px; padding-left:3px; border-radius:2.5px; margin-bottom:2px; } #accordion .content { background-color: #F4F5F5; display: none; padding:5px; }

<!-- Accordion Search Section -->
<apex:outputPanel id="accordianPanel" layout="block" style="float:left;width:20%;"> <div id="accordion"> <div class="accordionHeader"><h2>Search by License &amp; Product Code (EOC)</h2></div> <div class="content first"> <table style="text-align:right;width:100%;"> <tr> <td><apex:outputLabel for="licEOC" value="License #"/></td> <td><apex:inputText id="licEOC" styleclass="licenseAccordian" value="{!licenseNo}" onChange="validateLicense(this.value,this,'licenseFind');" onKeyUp="validateLicense(this.value,this,'licenseFind');" onmouseout="validateLicense(this.value,this,'licenseFind');"/></td></tr>
------------->
<!-- Results Section -->
<apex:outputPanel id="resultSearchSection" layout="block" style="float:right;width:79%;"> <apex:pageBlock id="licenseDetail" title="{!responseMessage}"> <apex:pageblockButtons location="top" rendered="{!if(licenseWrapper.licenses != null && licenseWrapper.licenses.size >0,true,false)}"> <apex:commandButton rendered="{!userRanking.Register}" value="Register" id="registerLicense" action="{!RegisterLicense}" rerender="dummy"/> <apex:commandButton rendered="{!(userRanking.Transfer || userRanking.Merged || userRanking.Unmerge)}" value="Transfer" id="transferLicense" action="{!TransferLicense}" onclick="redirectTotransfer();" rerender="dummy" /> <apex:commandButton rendered="{!userRanking.SyncLicense}" value="Sync License" id="syncLicense" action="{!null}" rerender="dummy"/> </apex:pageblockButtons>
I want to show/hide a div that contains an input field, based on the picklist value in lightning:

CMP: 
<div class="slds-col">
            <lightning:select class="select-auto-width" name="selectEmailPreference" aura:id="selectEmailPreference" label="Current Email Preference" required="true" onchange="{!c.setEmailPreference}">
            <option value="1">No Email Updates</option>
            <option value="2">Send all Email Updates</option>
            <option value="3">Send Critical Updates and Fixes Only</option>
        </lightning:select>

Show this div only when the value is either option 2 or option 3
 <div class="slds-col">
                   <lightning:layoutItem size="4">
                    <lightning:input type="email" label="Current Email"/>
                       </lightning:layoutItem>
                   </div>
Hi,

I want to show the 'SuppliedEmail' field on the form when the picklist value of 'Investigation_Email_Preference__c' is either "abc" or "def".

How do i do that with lightning:recordForm ?

Component:
<aura:component implements="flexipage:availableForAllPageTypes,force:lightningQuickActionWithoutHeader,force:hasRecordId">
<aura:attribute name="myFields" type="List" default="['Case_Investigation__c','Investigation_Subject__c','Investigation_Email_Preference__c','Tier2_Agent__c','SuppliedEmail']"/>
<lightning:recordForm
        recordId="{!v.recordId}"
        objectApiName="Case"       
        columns="2"
        fields="{!v.myFields}"
        mode="edit"
        onsubmit="{!c.handleSubmit}"/>

</aura:component>
I want to show/hide a div that contains an input field, based on the picklist value in lightning:

CMP: 
<div class="slds-col">
            <lightning:select class="select-auto-width" name="selectEmailPreference" aura:id="selectEmailPreference" label="Current Email Preference" required="true" onchange="{!c.setEmailPreference}">
            <option value="1">No Email Updates</option>
            <option value="2">Send all Email Updates</option>
            <option value="3">Send Critical Updates and Fixes Only</option>
        </lightning:select>

Show this div only when the value is either option 2 or option 3
 <div class="slds-col">
                   <lightning:layoutItem size="4">
                    <lightning:input type="email" label="Current Email"/>
                       </lightning:layoutItem>
                   </div>