I have registration from where the user enters their email address and then clicks join. The submit button triggers the an email validation action and then is supposed to redirect to another page, where the registration can continue but this doesn’t occur. I get this error:
SyntaxError: missing ) in parenthetical
[Break On This Error]
SORT BY:
Here’s the action that’s being called
public function actionValidateEmailAjax() {
$model = new RegisterStartForm;
$model->attributes=$_REQUEST['RegisterStartForm'];
$model->validate();
$response = array();
if ($model->hasErrors()) {
$response['good'] = 0;
$response['error'] = end(end($model->getErrors()));
echo json_encode($response);
Yii::app()->end();
} else {
$response['good'] = 1;
$response['email'] = $model->getEmail();
$this->render('/users/search');
echo json_encode($response);
Yii::app()->end();
}
}
I think the error occurs because the view file that users/search renders is a mix of html and php but I don’t know what to do about it. I should admit I’m also a relatively new yii user.