I am building a custom plugin to process a form. I am new to custom plugins and after looking at several different tutorials I am stuck on my form action. I would like to access the process form method in the class, is this correct with EE and if so, how do I go about it.
Thanks.
class Myform {
public function __construct()
{
$this->EE =& get_instance();
}
public function form()
{
$form_data = array(
"id" => $this->EE->TMPL->form_id,
"class" => $this->EE->TMPL->form_class,
"action" => //process_form()
);
$tagdata = $this->EE->TMPL->tagdata;
$form = $this->EE->functions->form_declaration($form_data) . $tagdata . "</form>";
return $form;
}
public function process_form()
{
return "testing";
}
// --------------------------------------------------------------------
/**
* Usage
*
* Plugin Usage
*
* @access public
* @return string
*/
function usage()
{
ob_start();
?>
Documentation will go here
<?php
$buffer = ob_get_contents();
ob_end_clean();
return $buffer;
}
// --------------------------------------------------------------------
} // END CLASS