No! What I meant to say was Jon, how do you code the box to accept no more than 255 characters?
I did a little research and I don't think it's possible with a textarea (multiline text) field. On a single line input text field you can set a "maxlength" parameter, but it doesn't work on the multi-line version. We
could
switch the field to a single line, but then you get that thing where the text scrolls off the right and/or left edges of the box and the only way to see it is to put your curser in the field and use the arrow keys or the home or end key - I've always found that very annoying.
I think all we can do is include a warning like "Warning: 255 character maximum length. Longer taglines will be cropped mercilessly."
Grr. I hate counting my own characters.
Is this board a javascript-free zone? If not, I bet you could do it with javascript.
Yup, JS free. And not just because we have lynx users. Actually, no. There is JS to put your cursor in the name field on the login screen.
Jon, can you just tell me how you'd style and position the warning?
You could code an error message that appears if it's too long...
You could code an error message that appears if it's too long...
Yeah. I was just trying to minimize processing on the server side, but if we can't handle it HTML, then that's what I'll do.
Jon, can you just tell me how you'd style and position the warning?
Sure... gimme a few minutes.
I don't know if this helps at all, but the
People
bulletin boards feature handles that are limited to only 50 characters. I don't know if their approach could be made to work here; the relevant code is, I think:
[input name="handle" type=text size=30 maxlength=50 value="Find your Higher Power. (Mine's laying on a chaise longue, smoking pot.) Bad Higher Power!!"]
Change square brackets to pointy ones, of course.
I don't know if this is feasible for the Phoenix board; I'm presuming some of the setup is different. But I thought I'd mention it.
Billytea, see my post above: Jon B "Buffistas Building a Better Board" Oct 28, 2002 9:37:51 pm EST
ita - I updated editprofile.php in test to include a warning. While I was at it, I added classes to the messages at the top of the page, right below the blood-colored bar. Should make the error messages stand out more.
Billytea, see my post above:
Ok. I don't find the scroll thing so annoying, myself; after all, it's only an issue when changing taglines. It seems to me that having to count your own taglines, or having administrators check tagline liength, would be more annoying.
It may be more of an issue that the code on the
People
site? I regularly had taglines over 50 characters (under 255, though; I had my own ideas about what was reasonable). It's possible to get around it if you want. (Don't know if that'd be the case here, or if there's a simple fix.)