Welcome Guest, Not a member yet? Register   Sign In
Make form field active / inactive dependent on previous choice
#1

[eluser]DannGrant[/eluser]
Hi guys,

I'm creating a form where the user has to choose from a list of items in a dropdown box.

If they choose 'other' I then want the field underneath to become active and allow them to type in their 'other' field.

Honest answer is, i don't even know where to start.

Any pointers?
#2

[eluser]JamieBarton[/eluser]
HI Dann

You could use jQuery to handle this.

Code:
$('.dropdown').change(function () {
    $(".other_input_field").attr("disabled", $(".other_input_field").val() == "other");
});

Is this what you mean?


Regards,
Jamie




Theme © iAndrew 2016 - Forum software by © MyBB