0

switching from force:input to lighting:input and have run into a few errors. first, my styling is off and I'm not sure why. enter image description here

here's my code for these sections-

<div class="slds-grid">
    <div class="slds-col">
        <div class="slds-wrap">
            <lightning:input name="State" value="{!v.newLLCRCase.LCR_State__c}" required="true" label="State"/>                
        </div>
    </div>
    <div class="slds-col">
        <div class="slds-wrap">
            <lightning:select name="Status" value="{!v.newLLCRCase.Status}" required="true" label="Status">
            <option value="New">New</option>
            <option value="Approved">Approved</option>
            <option value="Declined">Declined</option>
            <option value="Cancelled">Cancelled</option> </lightning:select>               
        </div>
    </div> 
</div>
<div class="slds-grid">
    <div class="slds-col">
        <div class="slds-wrap">
            <lightning:textarea name="Description" value="{!v.newLLCRCase.Description}" label="Description" />                
        </div>
    </div>
    <div class="slds-col">
        <div class="slds-wrap">
        </div>
    </div>
</div>

next, I have a lookup field to the Policy object but my code doesn't show the field at all.

<div class="slds-grid" >
    <div class="slds-col" >
        <div class="slds-wrap">
            <lightning:inputField name="PolicyNumber" value="{!v.newLLCRPP.Add_to_Contract__c}" required="true" label="Policy Number"/>                
       </div>
    </div>
    <div class="slds-col" >
        <div class="slds-wrap" >
            <lightning:input name="Product" value="{!v.newLLCRPP.Product__c}" required="true" label="Product" />                
        </div>
    </div> 
</div>

enter image description here could someone help me with correct syntax to get this lookup field functioning properly?

I think trying to convert from force to lightning namespace is the root of all my problems. this line of code is located at the top of my component-

 <aura:component controller="NewLLCRCaseCtrl" implements="lightning:isUrlAddressable,flexipage:availableForAllPageTypes,forceCommunity:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,force:hasSObjectName,force:lightningQuickAction" access="global">
2
  • Hi Nueve, please always use the { } button to format the code and add the relevant code snippets only. Also please don't add a screenshot of the code. – rahul gawale Aug 17 '20 at 18:31
  • @rahulgawale my apologies, removed the screenshots – nueve Aug 17 '20 at 20:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.