0

Is it possible to display a text box next to a cfselect upon selection in the cfselect.

If someone selects an option from the dropdown I need a date type field to be display. Is this possible perhaps with coldfuision and ajax?

2
Contributors
7
Replies
24
Views
4 Years
Discussion Span
Last Post by paulkd
0

Fully Successful
Exceptional
Needs Improvement

What I need is that when some select Needs Improvement a text box will appear when a date needs to be entered

0

Input text not showing when choosing needs improvement. How come you dont use cfform statements?

0

It works I added the jquery links and

<script>
    $(document).ready(function(){
       $("#grade").on("change",function(){
        if($(this).val()==3) {
            $("#datefield").removeClass("hidden");
        } else {
            $("#datefield").val("").addClass("hidden");
        }
    });
    });
</script>

I also added the document ready function. The only thing is that I cannot make the field a datefield type is not adding the calendar next to the text box

0

Hi,

The jsfiddle, as you have found, adds the onready handler. The reason I never use the cfform statements is that they seemed to require the same amount of work as simply adding the raw HTML equivalents. Sometimes, they require more work.

Edited by paulkd: missed a bit

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.