View Full Version : How would I make a field a required field

12-13-2005, 01:40 PM
...and how would I have a message come up saying "these fields are required" if the user doesn't input into the required fields? I'm baffled and my boss expects this pronto, can anyone help a brother out? Thanks!

12-13-2005, 02:25 PM
1. make sure your form field that needs to be required has a name
2. Behaviours-> validate field
3. Select your named field
4. Check 'required'

12-13-2005, 02:27 PM
you need a little javascript magic

function checkflds(){
//assign fields to vars
a = document.getElementById('field1');
b= document.getElementById('field2');
c= document.getElementById('field3');
d = document.getElementById('field4');

if(a.value=='' || b.value=='' || c.value=='' || d.value=='' ){

alert("you have some fields that need filling with stuff")

else {


you need to change your submit button to a normal button and add an...
onClick="checkflds()" event in your input tag

12-13-2005, 02:28 PM
dam your eyes dom

you beat me to it <_<

12-13-2005, 02:59 PM
i do however believe that validate field behaviour adds 4 ton (not 3 but 4 ton) of code

i like a tidy house therefore write my own

keep the house tidy...thats the secret :D