You need to sign in to do that
Don't have an account?
Stéphanie Park
How to include the field label inside the field on a VP page.
We have a VF page on our website that contains the following forms. We'd like to include the labels inside each field instead of having them above. Any solution?
<apex:form id="mainForm"> <apex:pageBlock > <apex:messages /><br/> {!$Label.FirstName}<br/> <apex:inputField value="{!lead.FirstName}" label="First Name" style="width:40%"/><br/> {!$Label.LastName}<br/> <apex:inputField value="{!lead.LastName}" required="false" style="width:40%"/><br/> {!$Label.Email} <br/> <apex:inputText value="{!lead.Private_Email__c}" style="width:40%"/> <br/> <apex:commandButton value="{!$Label.ConfirmRegistration}" action="{!confirmRegistration}"/><br/>
If you're talking about having the label inside field then probably you can use 'Placeholder'.
<apex:inputField value="{!lead.FirstName}" html-placeholder="First Name" />
Thanks,
Govindaraj.S
All Answers
If you're talking about having the label inside field then probably you can use 'Placeholder'.
<apex:inputField value="{!lead.FirstName}" html-placeholder="First Name" />
Thanks,
Govindaraj.S
Thanks! I had tried with only placeholder="First Name" and it was not accepted... I didn't know that trick!
Works well!