I have a view with 2 exposed filters . one is the start date and the other is the end date. I need to programatically control the end date filter based on a checkbox. I added a checkbox to the exposed form in the form_alter hook. I implemented views_query_alter hook to update the expiry date value based on the state of the checkbox. This works as expected so far.
The problem is with the display of the checkbox in subsequent displays of the page(Ex: Pagination or submit exposed form). I need to get the submitted value of the checkbox and display it as checked or unchecked accordingly. I am unable to get the value submitted for the checkbox using the variables $form and $form_state.
Can someone help me in getting the submitted value for a custom field in hook_form_alter?
Link to a similar issue. Not sure if the solution provided here works.