Skip to content

Instantly share code, notes, and snippets.

@bjornbjorn
Created February 17, 2012 12:21
Show Gist options
  • Save bjornbjorn/1853073 to your computer and use it in GitHub Desktop.
Save bjornbjorn/1853073 to your computer and use it in GitHub Desktop.
Creating a search_form() tag in an ExpressionEngine module
public function search_form()
{
/** ----------------------------------------
/** Get action ID for redirect_search method
/** ----------------------------------------*/
$hidden['ACT'] = $this->EE->functions->fetch_action_id(get_class($this), 'redirect_search');
/** ----------------------------------------
/** Return the final rendered form
/** ----------------------------------------*/
return $this->EE->functions->form_declaration(array('id' => 'search_form', 'hidden_fields' => $hidden))."\n" . $this->EE->TMPL->tagdata ."</form>";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment