Version: 1.01, by timetunnel
Developer Last Online: Mar 2007
Version: 3.5.0
Rating:
Released: 10-27-2005
Last Update: 11-15-2005
Installs: 20
Template Edits
No support by the author.
Hello.
For those of you who have public forums with members who may become future-banned members, because they have too much time on their hands, this is one area of the forum's E-mail system they won't be able to play with.
What I mean is, currently, the 'Contact Us' form's member's 'username' and 'E-mail' fields can be overwritten such that the admin can receive E-mail with the incorrect 'reply to' info if someone monkey's with the username and/or put's someone else's E-mail address in the field. This can cause some unknowing person to receive unwanted E-mail from the admin.
This 'playfulness' is expected from random 'guests'. Therefore, in order to restrict this behavior to 'guests' only, here is the code to make these fields 'uneditable' for logged-in members, since their profile values are automatically filled-in by the system. At least, they won't be able to 'play' here...
Locate the 'name' section of code. Modify with this:
NOTE: the difference in the 2 '<input...> statements is the 'readonly' attribute and a field message that lets members know those 2 fields are 'uneditable'.
Hope this helps.
EDIT: Make change to 'contactus' template
EDIT (11/15/05): CHANGED from 'readonly' to readonly="readonly" to make compliant although the original version works. The text file download was also updated.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Nice job with the instructions. If you don't mind, I revised it by putting credit to you in it and put it with the initial post now that I know how to do it. No other changes. Hope this is okay.
Thanks to all of you who have 'shown me the way...' :squareeyed:
Nice template mod, although I'd rather use disabled="disabled" than readonly. Using this method, the visual feedback is already there without having to note that it's uneditable..
Nice template mod, although I'd rather use disabled="disabled" than readonly. Using this method, the visual feedback is already there without having to note that it's uneditable..
attribute, the error message comes because of the difference between how it is handled over the 'readonly' attribute. The 'readonly' attribute still allows the parameters of the 'input' statement to be sent to the server when the form is submitted. Therefore, the input 'acts' like the type is 'hidden' vs. 'text'. When the disabled attribute is used, its parameters are NOT sent to the server thereby causing the error message, 'invalid email address'. The server never received the data.
In response to Andreas,
Quote:
2. This breaks XHTML validity
3. It does not stop users from using faked input
I'm not sure I understand. Can you explain, please?
For example, I'm not familiar with 'what' breaks XHTML validity since I haven't been working with it very long. Also, re: item 3, if the fields are 'readonly', how can the input be faked?