How do I pass a context filter to a block loaded by ajax? There is a block created in views that displays the values of the taxonomy term fields.
This block should be loaded when selecting a term from the select field in a custom form. Accordingly, the block needs to somehow pass the tid of the term selected in the form.
The Select field in the form is formed as follows:
$form['rq_program'] = array(
       '#type' =&gt; 'select',
       '#title' =&gt; t('Program'),
       '#options' =&gt; GetProgramNameArray(), 
       '#required'=&gt; TRUE,
       '#ajax' =&gt; array(
          'callback' =&gt; 'GetTermInfo', 
          'wrapper' =&gt; 'form-ajax-content',
          'method' =&gt; 'html',
          'effect' =&gt; 'fade',        
        ),
    );    

callback function:
function GetTermInfo($form, $form_state) {      
    $tid=taxonomy_term_load($form_state['values']['rq_program']); //value from select
    
    $block = block_load('views', 'views_program_block');
    $content = _block_get_renderable_array(_block_render_blocks(array($block)));
    $output = drupal_render($content);
    return render($output);  
}

I can't understand how to pass $tid to the block, how to set up a context filter in this block to receive this $tid?
If the block you generated uses a contextual filter, maybe this could be the answer: https://drupal.stackexchange.com/a/205731/98697