Question

I have a form in a view. When the user make a change on this form, I show a "save changes" button with Jquery.

Here is the jquery code :

$('input').change(function() { 
            //Show the "save changes" button
        }); 

It works great with different input (text, integer, checkbox,...) but not with the choicefield. When I change the value in the choicefield, there is no input change catched, but if I submit the form, the new value of the choicefield is indeed submited.

How can I catch the change of value on the choicefield ?

Was it helpful?

Solution 2

A "choicefield" is not an input. It is a select.

OTHER TIPS

$('select').change(function() { 
        //Show the "save changes" button
    }); 
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top