Jaxel
Well-known member
I've got a form on my page:
That executes my function:
Unfortunately, in my
What did I miss here?
Code:
<xf:form action="{{ link('ewr-medio/add-keyword', $media) }}" class="block" ajax="true"
data-xf-init="medio-tagger" data-replace="#media-keylinks">
<xf:textbox name="keywords" ac="single" data-acurl="{{ link('ewr-medio/find-keyword') }}" />
</xf:form>
That executes my function:
Code:
public function actionAddKeyword(ParameterBag $params)
{
if ($this->request()->isXhr())
{
return $this->view('EWR\Medio:Media\Keylinks', 'EWRmedio_media_keylinks', [
'keylinks' => $this->getKeyLinkRepo()->findKeyLink()->fetch(),
]);
}
else
{
return $this->redirect($this->buildLink('ewr-medio', $media));
}
}
Unfortunately, in my
medio-tagger
script, the contents of the returned HTML are of the "else" statement in my function, instead of the Xhr section.What did I miss here?