A "choicefield" is not an input. It is a select.
Detect input changes on form choicefield
-
11-07-2023 - |
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 ?
Solution 2
OTHER TIPS
$('select').change(function() {
//Show the "save changes" button
});
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow