function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ola BamideleOla Bamidele 

Moving input field label to top of entry box

Hi Gurus, 

I have this input field that save the entry into salesforce. However when the size is enlarged, the text is horribly squashed along the left side of the page.

So I have been trying to move the text to upon the entry box instead of the on the side but i have been unsuccessful. Does anyone know how I can achieve this?

My Code::
<apex:inputfield label="How would you rate the current service you receive from TIP Trailer Services?" value="{! Surveys__c.Service_Experience_Rating__c }" required="true"/> 
    
<apex:inputField label="What could TIP Trailer Services do to improve its services to you?" value="{! Surveys__c.What_could_we_do_to_improve__c }" style="width:100%; height: 70px;"/>

Thanks very much!
GhanshyamChoudhariGhanshyamChoudhari
because you are using apex:inputfield it will automatically apply salesforce classic style so you cant change the style.
But If you are using normal  HTML tag like <input type="text" name="test">  so you can use CSS to manipulate the look
 
Ola BamideleOla Bamidele
Hi GhanshyamChoudhari, 

Thanks for the suggestion. However I tried using the html tag and the question inside the label isnt displaying now so its isnt working correctly. 
Do you know why this is?


Thanks!

Ola
GhanshyamChoudhariGhanshyamChoudhari
Yes It will not work.
You need to write custom controller for this.
 
Ola BamideleOla Bamidele
Ohh really, that doesnt sound good as im not so good with apex. So the custom controller will be for displaying the text? or what action will it be for?

Thanks very much