custom block view form submitting twice.
Permalink
Can anyone tell me why my form in my block view is submitting twice?
In block view:
in block controller
The issue is when I click on the view form submit button, when my page refreshes.... the top of the page the var dump code I have in the action function in the controller outputs twice... Does anyone know why the form submit fires the block controller action function twice? Very frustrating....
In block view:
in block controller
public function action_register_for_shift(){ var_dump('action!'); $this->view(); }
The issue is when I click on the view form submit button, when my page refreshes.... the top of the page the var dump code I have in the action function in the controller outputs twice... Does anyone know why the form submit fires the block controller action function twice? Very frustrating....
Hey Gondwana,
Thank you for the help, but.... This doesnt solve my issue.
I still receive the output at the top of the page below:
string(7) "action!"
string(7) "action!"
So my function is being ran twice when I submit a form in my block view file.
I only have one instance of this block type on the page... so im not sure why this gets ran twice.
Thank you for the help, but.... This doesnt solve my issue.
public function action_register_for_shift($bID = false){ if ($this->bID != $bID) { return false; } var_dump('action!'); $this->view(); }
I still receive the output at the top of the page below:
string(7) "action!"
string(7) "action!"
So my function is being ran twice when I submit a form in my block view file.
I only have one instance of this block type on the page... so im not sure why this gets ran twice.
https://www.concrete5.org/marketplace/addons/contact-form-no-links1...
(It's free, so this isn't really a plug!)