The page is a custom search page created by the apachesolr module. In the sidebar I have multiple blocks that are just 'checkboxes' form elements of taxonomy terms (each block is a separate vocabulary). The checkboxes are used to select terms, which are written to ctools_object_cache using #ajax in the form when selected. What I need is to have a Clear button (or link) on the search form that does a few things:
- Clears the search field
- Deletes items from ctools_object_cache
- Deselects the checkboxes in the sidebar forms
- Selects a specific checkbox in another sidebar block (labeled "All")
Is it possible to do this using a #ajax button with Forms API? Or do I need to just write it as a separate Drupal behavior in jQuery? I know Drupal forms can be handled in jQuery, but from what I've seen, it's only for elements in the same form, not separate forms, even on the same page.
Thanks.
Steve