I have tried doing this to trigger a change event for a select that was created by editor but nothing happens. What am I doing wrong:
$("#DTE_Field_forms.case_id").change(function(){ alert("I was tapped"); });
This question has an accepted answers - jump to answer
Unfortunately there is a bug in Editor at the moment when the field name contains a . when the name is applied to the ID which makes it unelectable.
.
The workaround is to use the Editor API field().node():
field().node()
$('select', editor.field('forms.case_id').node()).change(function(){ alert("I was tapped"); });
The bug will be fixed in 1.4.
Allan
Thank you for your response. When I tried it I however got this error:
Uncaught TypeError: Object forms.case_id has no method 'node'
Any idea how this can be resolved.
Sorry - typo in my code above. I've corrected it now. Just a missing bracket.
Thank you this does work.
It looks like you're new here. If you want to get involved, click one of these buttons!
Answers
Unfortunately there is a bug in Editor at the moment when the field name contains a
.
when the name is applied to the ID which makes it unelectable.The workaround is to use the Editor API
field().node()
:The bug will be fixed in 1.4.
Allan
Thank you for your response. When I tried it I however got this error:
Uncaught TypeError: Object forms.case_id has no method 'node'
Any idea how this can be resolved.
Sorry - typo in my code above. I've corrected it now. Just a missing bracket.
Allan
Thank you this does work.