Skip to content
This repository was archived by the owner on Mar 4, 2019. It is now read-only.

Commit 71235a2

Browse files
committed
Fix hidden input fields (fix #3)
1 parent 49cc6f2 commit 71235a2

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

ajax_chain_select.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
}
3434
}
3535

36-
dc = $(parent_fieldset).find('.form-type-textfield input.acs-dc').val();
37-
dch = $(parent_fieldset).find('.form-type-textfield input.acs-dch').val();
36+
dc = $(parent_fieldset).find('input[type=hidden].acs-dc').val();
37+
dch = $(parent_fieldset).find('input[type=hidden].acs-dch').val();
3838

3939
if (current_level_id === "") {
4040
next_el.addClass('form-disabled').find('select').attr('disabled', 'disabled');

ajax_chain_select.module

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,15 @@ function ajax_chain_select_element_process($element, &$form_state, $form) {
135135
}
136136

137137
$chain_select_element[$element_name]['dc'] = array(
138-
'#type' => 'textfield',
138+
'#type' => 'hidden',
139139
'#value' => base64_encode($element['#data_callback']),
140-
'#attributes' => array('hidden' => TRUE, 'class' => array('acs-dc')),
140+
'#attributes' => ['class' => ['acs-dc']],
141141
);
142142

143143
$chain_select_element[$element_name]['dch'] = array(
144-
'#type' => 'textfield',
144+
'#type' => 'hidden',
145145
'#value' => ajax_chain_select_get_token($element['#data_callback']),
146-
'#attributes' => array('hidden' => TRUE, 'class' => array('acs-dch')),
146+
'#attributes' => ['class' => ['acs-dch']],
147147
);
148148

149149
return $chain_select_element;

0 commit comments

Comments
 (0)