*
* @param object $stateMachine reference to state machine object
*
- * @return object
- * @access public
+ * @return \CRM_Core_QuickForm_Action_Display
+ @access public
*/
function __construct(&$stateMachine) {
parent::__construct($stateMachine);
* render the page using a custom templating
* system
*
- * @param object $page the CRM_Core_Form page
- * @param boolean $ret should we echo or return output
+ * @param object $page the CRM_Core_Form page
+ *
+ * @internal param bool $ret should we echo or return output
*
* @return void
* @access public
$template->assign('isForm', 1);
$controller = &$page->controller;
- if ($controller->getEmbedded()) {
+ // Stop here if we are in embedded mode. Exception: displaying form errors via ajax
+ if ($controller->getEmbedded() && !(!empty($form['errors']) && $controller->_QFResponseType == 'json')) {
return;
}