kmecpp
Member
Trying to make a custom registration form but its not working in a modal (A modal does pop up but it says "Oops! We ran into some problems. Please try again later. More error details may be in the browser console.")
The error displayed in the browser's console is just "PHP: (Followed by the full HTML of the desired page (modal html + surrounding page html)"
The page works fine when just visiting it in the URL (going to website.com/registration) but not as a modal.
The button that opens the modal:
My controller:
I get the "It ran" error message when the button is clicked on and the modal pops up so I know its running.
What am I doing wrong here?
The error displayed in the browser's console is just "PHP: (Followed by the full HTML of the desired page (modal html + surrounding page html)"
The page works fine when just visiting it in the URL (going to website.com/registration) but not as a modal.
The button that opens the modal:
Code:
<a href="{{ link('registration') }}" class="guest-link p-navgroup-link p-navgroup-link--textual p-navgroup-link--register" rel="nofollow" data-xf-click="overlay">
<span class="p-navgroup-linkText">Sign Up</span>
</a>
My controller:
Code:
class Registration extends AbstractController {
protected function preDispatchController($action, ParameterBag $params) {
\XF\Pub\App::$allowPageCache = false;
}
public function actionIndex() {
XF::logError("It ran");
return $this->view(false, 'registration', []);
}
}
I get the "It ran" error message when the button is clicked on and the modal pops up so I know its running.
What am I doing wrong here?