PDA

View Full Version : Change new reply 'title' to 'readonly'


timetunnel
15 Nov 2005, 19:56
Hello.

This is to make the 'title' field UNEDITABLE in new replies so only the title from the thread is used.

In the 'newreply' template,

Find this code:
<td class="smallfont" colspan="3">$vbphrase[title]: on the same line or below it, add e.g.
&nbsp;<font class="smallfont">(uneditable since replying)</font>
NEXT, scroll a few lines down and...

Find this code:
<input type="text" class="bginput" name="title" value="$title" size="50" maxlength="85" tabindex="1" title="$vbphrase[optional]" /> and

Modify to:
<input type="text" class="bginput_title" name="title" value="$title" size="50" maxlength="85" tabindex="1" title="$vbphrase[optional]" readonly="readonly" /> where,

class="bginput_title" can be changed to whatever class of attributes you want to have for the BACKGROUND COLOR of the input text field.

Since the 'readonly' attribute is used, the data for this field is still sent to the server.

Have fun!

EDIT: CHANGED in 'Modify to:' from 'readonly' to readonly="readonly" for compliance. The original version works, but should be compliant... :rolleyes:

TCM
15 Nov 2005, 21:09
readonly="readonly" should be used for compliance.

Good idea, although I don't intend to use it myself.

Tony G
15 Nov 2005, 23:48
Thank you for sharing. :)

Could you please put your instructions into a .txt file and attach them? Thanks.

timetunnel
16 Nov 2005, 03:11
readonly="readonly" should be used for compliance.

Good idea, although I don't intend to use it myself. I revised the code to make it compliant. Thanks for that reminder.

Thank you for sharing. :)

Could you please put your instructions into a .txt file and attach them? Thanks. I attached the file with the revised code. ENJOY!