Friday, July 8, 2016

How to Show Place Holder For Input Fields in Visual Force Page

Source Code

<apex:page standardController="Account">
    <apex:form >
    <apex:sectionHeader title="Place Holder in Salesforce"/>
      <apex:pageBlock title="Account Information">
       <apex:pageBlockSection >
           <apex:inputField value="{!}" html-placeholder="I Love Coding...You?"/>
           <apex:inputField value="{!account.AccountNumber}" html-placeholder="478788788"/>
           <apex:inputField value="{!account.Site}" html-placeholder=""/>
           <apex:inputField value="{!account.Fax}" html-placeholder="A77GHSH"/>


Thanks for visiting...Enjoy!

1 comment:

  1. How to change placeholder value. I need dynamic values in placeholder like below example.
    I have picklist with values solid and liquid grams as values and text field.
    Type of quantuity: if i choose solid the text field should display killo grams as placeholder and when i choose liquid then text field placeholder should be leters.
    Please help me on this