Site in read-only mode
This site is now read-only following the release of MyBB 1.8 and the new mods site.
If you are looking for MyBB 1.8 mods please click here to visit the new mods site.
You can continue to download submissions for MyBB 1.6 and earlier here, however new submissions will only be accepted via the new mods site.
Disappearing Text In Input Fields
Add Static text to your input fields which disappears on clicking in there and re-appears on clicking out of the field
Disappearing text in input boxes
find the code you want to use this with
eg for the advanced search page in MyBB
find this in the templates section in the ACP
Expand the search template and click on search
Find the field you want the text to be in
(this can be any field . We are just using the 'keywords' field as an
example)
look for
<td
valign="top"><input type="text" class="textbox" name="keywords"
size="35" maxlength="250" /></td>
change it to :-
<td
valign="top"><input name="keywords" type="text"
size="35" style="color:#999;" maxlength="250" id="keywords"
onblur="this.value = this.value || this.defaultValue; this.style.color =
'#999';" onfocus="this.value=''; this.style.color = '#000';"
value="Search"></td>
(above explained)
This will put the word Search inside your text box
Which once clicked inside it will disappear
if you click outside it will re-appear
Whatever you type from then on inside the box will stay there
when clicking outside of it and so on....
On the end of your input field , it has added
value="Search"
this value can be whatever you want to display inside the text field .
For eg. value="What a fantastic idea this little hack is"
The only other edit you may need to make is changing the text colors :-
Experiment with the hex color codes to find your skin match
This works a treat for me as it adds info for the end user
This is in-line JavaScript at its best and can be used anywhere on your
forum Just Make sure for each field that you use it in you give each field
its own unique ID for eg. id="keywords" as above your next field may be
perhaps id="username" and so on.....