I have followed the instruction on readme page, to create sub-class MyContactPage form ContactFormPage, and create page on cms, and can see the form on 'url/contact' ie contact page.
When I try to include the contact form in HomePage, the form get displayed, but form action is set as 'url/home/Form' while I want the form action attritbute like 'url/contact/Form'. so that form get submitted to contact page and processed.
Below is the code from HomePage_Controller.php
public static function Form(){
$page = MyContactPage::get()->First();
if($page){
$controller = new MyContactPage_Controller($page);
$form = $controller->Form();
return $form;
}
}
I have followed the instruction on readme page, to create sub-class MyContactPage form ContactFormPage, and create page on cms, and can see the form on 'url/contact' ie contact page.
When I try to include the contact form in HomePage, the form get displayed, but form action is set as 'url/home/Form' while I want the form action attritbute like 'url/contact/Form'. so that form get submitted to contact page and processed.
Below is the code from HomePage_Controller.php