How to pass theme variables in #theme in a form element? I need to pass product variable defined in hook_theme() and invoked in #theme
but not sure how to pass product variables in #theme
Please suggest.

    function storeinv_theme() {
      return array(
        'storeinv_pickup' =&gt; array(
          'variables' =&gt; array('product' =&gt; NULL),
        ),
      );
    }

    function storeinv_uc_product_description($product)      {
      $description = array(
        'pickup' =&gt; array(
          '#product' =&gt; array(
             '#type' =&gt; 'value',
             '#value' =&gt; $product,
           ),
           '#theme'  =&gt;'storeinv_pickup',
           '#weight' =&gt; 1,
         ),
      );


       return $description;
}

    function theme_storeinv_pickup($product){

            $data = $product['#value']-&gt;data;

            if (isset($data['pickup']['store_id']))
            {
                    $store_id = $data['pickup']['store_id'];
                    $day = $data['pickup']['day'];
                    $date = date( 'l m/d/Y g:ia', strtotime( $day ) );
                    $result = views_get_view_result('field_altstoreid_value','default');
                    foreach($result as $k =&gt; $v){
                      if ($store_id == $v-&gt;field_altstoreid){
                            $name = $v-&gt;title;
                            return "&lt;p&gt;Pickup " .$date."at " . $name." &lt;/p&gt;";
                      }
                    }
            }
            else {
                    return '';
            }
    }
Minor syntax change required...

function storeinv_uc_product_description($product)      {
  $description = array(
    'pickup' =&gt; array(
      'product' =&gt; array('#type' =&gt; 'value', '#value' =&gt; $product),
      '#theme'  =&gt;'storeinv_pickup',
      '#weight' =&gt; 1,
    ),
  );
  return $description;
}


Your product variable doesn't need to be prefixed with a hash character. Thats used for specific keys/properties of the render array.