This Message Forum is no longer in use
Please use the new Bravenet Help Forums FOUND HERE
I've made numerous tests. Anybody else notice that the maximum characters setting doesn't work with the new email form code from bravenet? I tried setting it to just 30 characters (or 50 or 250, etc.) and I can still input limitless amounts of text. The Name and Email fields DO stop at a specified character limit. The Max Characters is a new feature not found in the old code, so I'm wondering if there's a bug. Go try it on your form and let me know if it's just me.
No, this is not a bug. The only thing that is possibly a bug, is that, by putting the "maxlength" attribute in the
But on the email Forms Builder page, Bravenet provides a field for setting the maximun characters limit for the message block. Even the mouse hover "Help" balloon says it can be set as desired, and if you leave it blank character input will be limitless (i.e., subject to spam or mischief). But it doesn't work currently as offered. This appears to be a design flaw then? Surely they tested this?!
Even Bravenet staff make mistakes occasionally.
I submitted a support ticket to let Bravenet know about this problem. If their tech team replies, I'll post something here.
I don't think Bravenet support have access to make changes to millions of people's web browsers to add new functionality into HTML that their browser doesn't support. Not even the browser writers can force people to install their patches.
There is no way to restrict input into a textarea field in HTML.
Good news, I found a simple javascript code fix, tested it, and it works. It even puts up a "maximum characters exceeded!" notice if someone tries to copy and paste in a long spam message. I'm waiting for a response from Bravenet Support before I post it here. Check back.
Yes, I originally said that there are some Javascripts that can help you around the problem. However, I also said, they are crude. I am not trying to pick on your efforts, but you need to take a closer at those scripts. They are far from code fixes, and merely loose bandaids.
The better scripts will check your form fields when the submit button is clicked. If your text areas have too much data, the form will not be submitted or processed. But even those can be disabled, if the user turns off Javascript.
I would be interested in any response from Bravenet, but there isn't a lot they can do. You need to realize that this is not a server issue, it is a browser issue. At the most, bravenet can modify the form builder, so it elimates the little box that allows you to enter a character limit. Then you won't think that a limit exists. But that doesn't solve your problem. What they can't do is redefine the HTML standard, make the browser designers enforce a limit, and make everyone in the world upgrade their browsers.
Possibly, if you had high end hosting that allows you to write your own form processor, you could reject forum submissions that exceed your limits. Beyond that, your stuck with what exists. Good luck anyway.
HERE IS A JAVASCRIPT CODE FIX:
Purpose: to limit the amount of characters that can be entered into a "textarea" field, such as in Bravenet's email form. I have tested this code and it works. The email form processes normally and emails arrive just fine.
Article: http://javascript.about.com/library/bltxtmax1.htm
STEP ONE: Copy and paste the following code into the Head portion of the page's code. I left off the "less than <" sign here in front of the "script" anchor tag top and bottom so that this code would display in this post. Be sure to include it on your page or the code won't work. You can change the alert message that pops up when the limit is exceeded if you wish.
---copy and paste below this into the Head section---
script language="JavaScript">
function textLimit(field, maxlen) {
if (field.value.length > maxlen + 1)
alert('This form has a character limit!');
if (field.value.length > maxlen)
field.value = field.value.substring(0, maxlen);
}
/script>
---copy and paste above this---
STEP TWO:
In the form part the code, replace the nonworking line
max length="1000"
with
="textLimit(this, 1000);"
I have it set in this example for 1000 characters, which is about a medium-length letter. On my site, I prefer 2000 characters. The number of characters has nothing to do with the width and height of the text box settings. Paragraph breaks seem to count as 2-3 characters.
Sure, this code can be defeated if someone goes to the trouble of turning Javascript off (although I haven't tested that), but at least it provides some discouragment to long email mischief-makers. On my page I mention that the email form, like regular email, includes the sender's IP address. I also haven't tested this to see if it will work on more than one textarea field on the same page, like in a survey form. Probably will.
*MISSING WORD IN ABOVE CODE:
Sorry, for some reason the word o-n-keyup (without hyphens) would not appear if included in this post in the code. You can see it in the about.com article.
I could not even get it to appear here without adding the hyphens! It goes in front of the equal sign in this line:
="textLimit(this, 1000);"
time to move on
The problem with your code James is that people can paste way more than the set limit. I just pasted 1969 characters in the web site set for 40. If you want to truly set a limit, in IE only, google "bhvMaxlength" and apply the codes which works whether one types or pastes a whole bunch of characters. It incorporates what Microsoft names public component using JScript.
Yes, I find that I can copy and paste a larger amount of text into the message field than the specified limit, but then the alert box pops up and no further action can be taken until the "OK" button on it is clicked. When that happens, the excess characters vanish down to the specified limit.
The code works on my site written in html and with IE browsers. I've seen the max limit set differently with other more advanced code formats. I'm happy with how it's working. It's not that major an issue. It's been days and Bravenet support has not responded, so I imagine they're assessing if they should stop offering a code option that doesn't work. It's not my javascript code, I got it from the about.com site. At least this is one available option. Thanks to all.
RESPONSE FROM BRAVENET:
I heard from Bravenet Support. They said their developers are looking into this issue and in the meantime they gave me permission to post the above javascript code fix.
I have a paid pro account and the email form works fine now with the above javascript. Should work on the free version, too, I imagine. Remember, this is only for the textarea portion of the form's code. Bravenet's max character codes still work okay with the input Name and Email fields. No need to change anything there.
next topic please
FINAL RESPONSE FROM BRAVENET:
Here is the response to my support ticket concerning the inability to set maximum characters in the email message block in Bravenet's form builder. It is important to include this response because people search these forums using keywords looking for answers. Basically, anyone who wants to set a character limit for textarea should use the above javascript code or some other code of their choice.
From Bravenet Staff:
"Thank you for reporting this. Sorry for the delay, but a panel of experts had to review this ticket. Since Textarea does not support maxlength we have removed it from the builder."
- This post should conclude this topic. Thanks. -
Concluded except for the fact that, the form builder now arbitrarily deletes your forms. Before they "fixed" things, I had three forms built. One of them was large and still in progress. Now, all three still list, but large one has no data. If I select one of the other forms first, and then go to the deleted one, it show the information from the other form. For me it's not a big deal, because I have my data stored on my local PC. But, I suspect that we are still going to be hearing about the form builder.

