/ Published in: PHP
                    
                                        
What it does: clears & submits exposed filters form via AJAX (if enabled, otherwise normal page refresh).
This is for Views 2.x. It works with the 'remember me' option.
You need to create a custom module. E.g. custom/custom.module and custom/custom.info. Enable your custom module via admin/build/modules.
                This is for Views 2.x. It works with the 'remember me' option.
You need to create a custom module. E.g. custom/custom.module and custom/custom.info. Enable your custom module via admin/build/modules.
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
function CUSTOM_form_alter(&$form, $form_state, $form_id) {
if ($form_id == 'views_exposed_form') {
'#type' => 'markup',
'#value' => '<input '. drupal_attributes(array('type' => 'button', 'value' => t('Reset') )) .'onclick="javascript:$(this.form).clearForm();$(this.form).submit();" class="form-submit" />',
);
}
}
URL: http://drupal.org/node/99370#comment-2465716
Comments
 Subscribe to comments
                    Subscribe to comments
                
                