+ Start a Discussion

Having a default text in an input text field

Hi ,


I need a default text to be dispalyed to the left of an apex input text component like "%" or "CGPA" to the left by default.


When I enter the value it should get appended to the left without affecting the value.


Could some one please guide me in having this done.


Thanks in Advance,




Maros SitkoMaros Sitko
Probably it's some search input. your input text probably is something like this
<apex:InputText value="{!searchIt}" />

if yes, put into variable in your constructor default value :
searchit = '%';

then if user click on 'Search button', you can check if variable searchit begins with '%' and if not add it again at the beginning.

If you have different issue, pleas be more specific about your code