You need to sign in to do that
Don't have an account?
Default Value for InputText
Hi all,
The scenario is i want a default value say 'HELLO' to be present For <apex:inputText>
After that user can enter it's own value . so my onclick will clearthe last value
But I am not able to set a default value.
Here is the code snippet:
<apex:inputText value="{!SomeValue}" onclick="clearinputtext(this);" />
Regards,
Subham
Have you tried initializing the variable SomeValue in the constructor of your Controller / Extension?
Regards
All Answers
Have you tried initializing the variable SomeValue in the constructor of your Controller / Extension?
Regards
In Constructor , it is blank,
I can't put any other value there because a web service callout is made when page loads so whatever i put in constructor it goes to web service as a request parameter
isn't there anything like Placeholder in HTML input type = "Text"
what about setting it with javascript?
Where is the callout made from? If it's the constructor, you can initialize the value after the callout.
take as this example
<input name="pg:frm:search" type="text" class="gridDatagrey" id="pg:frm:search" style="height:25px; width:170px; float:left; font-style:italic" value="Search Contacts" />