What I'm not sure how to do and can't seem to find online is have the form submit when a user clicks a suggestion instead of simply completing that field.
$(document).ready(function(){
Drupal.jsAC.prototype.select = function (node) {
this.input.value = $(node).data('autocompleteValue');
if(jQuery(this.input).hasClass('auto_submit')){
this.input.form.submit();
}
};
})
then on your form item add:
'#attributes' => array('class'=> array('auto_submit')),
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment