Form Block $this->action Page Not Found
I apologise if this has already been discussed anywhere but I can't seem to find anything on it,
I'm currently using 5.7.2
When I add a form block into a global area the post back gives me a 'Page Not Found' error but works fine when used in a general (non global) area.
I'm using everything out the box with no customisations or custom templates.
Is this a know thing and is there a work around?
This only happens when you have only one page (The homepage)
Doesn't work on the new pages
I think block actions – used by interactive blocks that post back, like form and survey – are broken when included in global areas. I have added this as something to fix in Github.
Do you know if there is anyway round it for the time being? All i'm trying to do is get the good old contact form in a global area.
Edit: I think I have answered my own question, Essentially create an element in the theme and hard code the form and submission, it is a global area after all. It will do until a new solutions comes up.
This is what I have hardcoded...
<div class="ccm-custom-style-container ccm-custom-style-main-718 block-subscribe-form" > <div id="formblock718" class="ccm-block-type-form"> <form enctype="multipart/form-data" class="form-stacked" id="miniSurveyView718" class="miniSurveyView" method="post" action="/clanline/index.php/submit_form#1417089750"> <div class="fields"> <div class="form-group field field-email col-md-12"> <input name="Question6" id="Question6" class="form-control test" type="email" placeholder="Enter your email address" value="" /> </div> </div><!-- .fields --> <div class="form-actions"> <input type="submit" name="Submit" class="btn btn-primary" value="GO!" /> </div> <input name="qsID" type="hidden" value="1417089750" /> <input name="pURI" type="hidden" value="" /> </form> </div><!-- .formblock -->
Andrew, is there something that needs to be done to this line of code to call the controller.
$formAction = $view->action('submit_form').'#'.$qsID;
How do other blocks call/reference the controller.php file from a GlobalArea, and what is different with the form block?
Apologies if this doesn't make much sense, very happy to discuss further.