Skip to main content
This is a PHP function I wrote that helps simulating a drupal get form for Views Exposed Filters, it returns the exposed form array so you can theme it or alter it:


function _get_exposed_form($view, $display_id){
$view = views_get_view($view);
$view->set_display($display_id);
$view->init_handlers();
$form_state = array(
'view' => $view,
'display' => $view->display_handler->display,
'exposed_form_plugin' => $view->display_handler->get_plugin('exposed_form'),
'method' => 'get',
'rerender' => TRUE,
'no_redirect' =…
Read more
Friday, July 20, 2012
Yesterday, I was working on a new requirement on a website I'm currently working on and the idea of it is make Drupal provide a Widget so anyone can copy/paste a single piece of HTML code inside a iframe and embedded that code anywhere, so providing ans iframe is not a big deal but of course the iframe will display inside it whatever comes from the source url you set for it, example:

<iframe frameborder="0" height="480" src="http://www.mysite.com/widget/"; target="_blank" align="center" width="360" scrolling="Auto"; bgcolor="#C9D3DE"> </iframe>

In this case "src" retrieves…
Read more