You need to sign in to do that
Don't have an account?
PE Dev3.5
How to create VisualForce page with Lightning Design System
Hi, I have created a visualforce page with Lightning Design System. I have added various fields like input, picklist, radio buttons etc. I got the look and feel of LDS in both classic and Lightning mode using below code.
<div class="slds-form-element">
<label class="slds-form-element__label" for="text-input-01">Input Label</label>
<div class="slds-form-element__control">
<input id="text-input-01" class="slds-input" type="text" placeholder="Placeholder Text" />
</div>
</div>
Now I am trying to code such that it works fine in classic and Lightning mode. I need to bind the LDS fields with some object fields as we do in classic mode.
<apex:inputField value="{!obj.fieldApiName__c}">
I am not seeing any document/help from salesforce to proceed on this. Any help on this will be highly appreciable.
Thanks,
<div class="slds-form-element">
<label class="slds-form-element__label" for="text-input-01">Input Label</label>
<div class="slds-form-element__control">
<input id="text-input-01" class="slds-input" type="text" placeholder="Placeholder Text" />
</div>
</div>
Now I am trying to code such that it works fine in classic and Lightning mode. I need to bind the LDS fields with some object fields as we do in classic mode.
<apex:inputField value="{!obj.fieldApiName__c}">
I am not seeing any document/help from salesforce to proceed on this. Any help on this will be highly appreciable.
Thanks,
Thanks to put your solution.
I found the work around for my above post. Also discuss with salesforce regarding my work around.
<div class="slds-form-element">
<label class="slds-form-element__label" for="text-input-01">Input Label</label>
<div class="slds-form-element__control">
<!-- input id="text-input-01" class="slds-input" type="text" placeholder="Placeholder Text" /> -->// Comment this line
<apex:inputField styleClass="slds-input" value="{!obj.fieldApiName__c}"> // We can use this apex attribute and use styleClass="slds-input" to get the look and feel of LDS input field.
</div>
</div>
All Answers
<aura:attribute name="account" type="Account" default="{ sobjectType: 'Account' }"/>
<force:inputField value="{!v.account.Name}" />
Error: Unknown component aura:attribute
<div class="slds-lookup" data-select="multi" data-scope="single" data-typeahead="true">
<div class="slds-form-element">
<label class="slds-form-element__label" for="lookup">Accounts</label>
<div class="slds-form-element__control slds-input-has-icon slds-input-has-icon--right">
<svg aria-hidden="true" class="slds-input__icon slds-icon-text-default">
<use xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#search"></use>
</svg>
<input id="lookup" class="slds-input" type="text" aria-autocomplete="list" role="combobox" aria-expanded="true" aria-activedescendant="" />
</div>
</div>
</div>
I am just creating Contact form where i am using Account field as a lookup. but not able to find the Account value in this field.
Thanks to put your solution.
I found the work around for my above post. Also discuss with salesforce regarding my work around.
<div class="slds-form-element">
<label class="slds-form-element__label" for="text-input-01">Input Label</label>
<div class="slds-form-element__control">
<!-- input id="text-input-01" class="slds-input" type="text" placeholder="Placeholder Text" /> -->// Comment this line
<apex:inputField styleClass="slds-input" value="{!obj.fieldApiName__c}"> // We can use this apex attribute and use styleClass="slds-input" to get the look and feel of LDS input field.
</div>
</div>