PDA

View Full Version : HTML Form question



iAdam
08-01-2006, 03:36 PM
How do you make a question in a form un-optional?

Luckyrare
08-01-2006, 03:39 PM
I dont get what your asking but

http://habboxforum.com/showthread.php?t=26889

A tutorial writen by Mentor

iAdam
08-01-2006, 03:41 PM
I mean you have to fill it in before you can send the form.

Splinter
08-01-2006, 04:10 PM
just check the field has been filled in..

nets
08-01-2006, 04:43 PM
<?php
if($pet == '') die('You did not fill in one of the required fields.');
?>


Edit: Put that just after you get the vars from the user.

Splinter
08-01-2006, 04:45 PM
or

if(!$pet) {
echo "You did not fill in one of the required fields!";
exit();
}


the ! just check that the string $pet contains data..

Mentor
08-01-2006, 08:03 PM
u could proboly do it activly with js, by adding the onclick hander to the submit button, and checking values are entered in the form feiled, retruning faluce if not and poping up whats missing "/

Splinter
08-01-2006, 08:12 PM
I do that with php anyway since I usually include the html form in with the php document and use a javascript alert to warn them what needs filing in ;)

iAdam
09-01-2006, 05:23 PM
My host dont allow php so whats the jv one?

Luckyrare
09-01-2006, 05:44 PM
My host dont allow php so whats the jv one?

If you dont have php how are you doing form?

iAdam
09-01-2006, 05:49 PM
HTML
freewebs allow forms.

Jamie.
09-01-2006, 06:42 PM
suppose... but i would use php :p

the wombats
09-01-2006, 06:44 PM
HTML
freewebs allow forms.
Change from Freewebs.....

Anderman
09-01-2006, 06:45 PM
They have there own form handler

Jamie.
09-01-2006, 06:48 PM
Change from Freewebs.....
well said :eusa_clap :) i dont like 'em there alright to make a poor site they allow 50 upload limit or sumin i suggest you move to one which SUPPORTS php

the wombats
09-01-2006, 06:49 PM
www.crisphosting.com :) They have a free package.

Jamie.
09-01-2006, 06:49 PM
yep, aint that wit cpanel aswell :p

Anderman
09-01-2006, 06:50 PM
They also have a paid package wich is much more worh it

Jamie.
09-01-2006, 06:51 PM
it does take upto 5 working days or sumin like dat to get it activated

Want to hide these adverts? Register an account for free!