Вопрос

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 ?

Это было полезно?

Решение 2

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

Другие советы

$('select').change(function() { 
        //Show the "save changes" button
    }); 
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top