PDA

View Full Version : Word limit?!



lionegg
03-13-2006, 07:58 PM
Hi I am currently setting up a form and i would like the form to contain a field that has a word/character limit of lets say 160 characters. Can this be done, if so how? Many thanks

Watdaflip
03-14-2006, 12:50 AM
Yes it can be done with some javascript. I don't know if BV has it, but it can be found online on many sites

navaldesign
03-14-2006, 08:23 AM
Do it directly in BV. In the text field properties, set the lenght field to be 160. To get to the field properties double clock on the field itself.

Watdaflip
03-14-2006, 04:28 PM
O sorry, misread the post, I thought you wanted it to say how many characters you had left. Do what naval said

lionegg
03-14-2006, 06:21 PM
Thanks watdaflip and naval design, i hadn't upgraded so i didnt have that option. Any ideas on how to limit the size of an upload?

navaldesign
03-15-2006, 05:43 AM
Thanks watdaflip and naval design, i hadn't upgraded so i didnt have that option. Any ideas on how to limit the size of an upload?

This can't be done in BV, it has to be done in the processing script. But do you have an appropriate script?

lionegg
03-15-2006, 10:08 PM
I have a basic script from my first website (the script is used on the following page http://www.lionegg.co.uk/sign_up.html) and is as follows

<HTML>
<HEAD>
<TITLE>Succesfully processed your order</TITLE>
<script type="text/javascript">
<!--
function delayer(){
document.location = "../index.html"
}
//-->
</script>
</HEAD>
<BODY onLoad="setTimeout('delayer()', 5000)">
<H2>Thank-you! You have successfully registered</H2>
<?PHP
$email = $HTTP_POST_VARS[email];
$mailto = "register@lionegg.co.uk";
$mailsubj = "register";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Values submitted from web site form:\n";
while (list ($key, $val) = each ($HTTP_POST_VARS))
{
$mailbody .= "$key : $val\n";
}
mail($mailto, $mailsubj, $mailbody, $mailhead);
?>
</BODY>
</HEAD>

unfortunatly i can take no credit for this, and therefore i dont know how to adjust and add the limit and error pages incase a field has not been filled in. Any help you could give me would be great as i would like to get my new site up and running as soon as possible and learning script i imagine it would take some time. Thanks for all your help so far.

navaldesign
03-16-2006, 05:11 AM
Just create your form, publish it, let me know the URL and i will send you the necessary script. Let me also know which fields you need as required.

lionegg
03-19-2006, 02:01 PM
Hi navaldesign,
the form can be found at www.lionegg.co.uk/temp.html (http://www.lionegg.co.uk/temp.html) its only a small form, all fields are required and i need the image (with size limit) to be recieved as an attachment with the rest of the information when it is sent. I understand it currently goes to a default folder but this would not be good for me. Thank-you in advance.