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

Commit

Permalink
Fix hidden input fields (fix #3)
Browse files Browse the repository at this point in the history
  • Loading branch information
dashohoxha committed Aug 30, 2015
1 parent 49cc6f2 commit 71235a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions ajax_chain_select.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
}
}

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

if (current_level_id === "") {
next_el.addClass('form-disabled').find('select').attr('disabled', 'disabled');
Expand Down
8 changes: 4 additions & 4 deletions ajax_chain_select.module
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,15 @@ function ajax_chain_select_element_process($element, &$form_state, $form) {
}

$chain_select_element[$element_name]['dc'] = array(
'#type' => 'textfield',
'#type' => 'hidden',
'#value' => base64_encode($element['#data_callback']),
'#attributes' => array('hidden' => TRUE, 'class' => array('acs-dc')),
'#attributes' => ['class' => ['acs-dc']],
);

$chain_select_element[$element_name]['dch'] = array(
'#type' => 'textfield',
'#type' => 'hidden',
'#value' => ajax_chain_select_get_token($element['#data_callback']),
'#attributes' => array('hidden' => TRUE, 'class' => array('acs-dch')),
'#attributes' => ['class' => ['acs-dch']],
);

return $chain_select_element;
Expand Down

0 comments on commit 71235a2

Please sign in to comment.