Homepage - 5.6 PageType controller action not firing

Permalink
Hi,
On my home page, I have a form that submits to the controller:

Home.php (page type)
<form method="post" action="<?php echo $this->action('foo') ?>" >

Page Type Controller:
<?php
defined('C5_EXECUTE') or die("Access Denied.");
class HomePageTypeController extends Controller {
public function on_start(){
$this->set('userCodePosted', '1234567890');
}

public function foo() {
$this->set('userCodePosted', '0987654321');
}
}
?>

The "on_start()" action works fine on page load, but when I submit to "foo()" the controller, nothing happens. The page reloads and $userCodePosted is not updated. I don't think "foo()" is firing at all.

Can a homepage have actions? Anyone else have this issue.

jmcgarvey
 

This website stores cookies on your computer. These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media. To find out more about the cookies we use, see our Privacy Policy.