Changing the linked input type to hidden seems mandatory for selection to work.
$('.next-results, .prev-results').addClass('disabled');
},
});
+
+ var _chosen_id_input = $('{{ js_chosen_id }}_input');
+ if ( typeof(_chosen_id_input) != 'undefined' && _chosen_id_input != null ) {
+ _chosen_id_input.prop('type', 'hidden');
+ }
}
$(function() {
{% block javascripts %}
<script type="text/javascript">
{% include "elements/js/choose_adh.js.twig" %}
- document.getElementById('id_adh_input').type = 'hidden';
$(function() {
{% block javascripts %}
<script type="text/javascript">
{% include "elements/js/choose_adh.js.twig" with {"js_chosen_id": "#parent_id"} %}
- var _parent_id_input = document.getElementById('parent_id_input');
- if ( typeof(_parent_id_input) != 'undefined' && _parent_id_input != null ) {
- document.getElementById('parent_id_input').type = 'hidden';
- }
$(function() {
$('#company_field.nocompany').addClass('displaynone');