localhost8080
Well-known member
Hi friends of this nice peace of bugware.
Sometimes I wish I had never moved from phpbb to this stuff. But who cares.
I do some simple stupid form stuff and send it to my class.
Like a textbox where a user enters his name and I respond his name back from my class.
But, instead of displaying the response, I get
When I look in my console, I see the correct modified stuff from my method in json format but the page content doesn't change except that nice error overlay.
wtf?
I have a simple form in my template:
and a callback class method that is being called on form submit:
in the js console I see the output of the var_dump from my method...
some one got a hint what's going wrong here?
thank you.
Sometimes I wish I had never moved from phpbb to this stuff. But who cares.
I do some simple stupid form stuff and send it to my class.
Like a textbox where a user enters his name and I respond his name back from my class.
But, instead of displaying the response, I get
The server responded with an error. The error message is in the JavaScript console.
When I look in my console, I see the correct modified stuff from my method in json format but the page content doesn't change except that nice error overlay.
wtf?
I have a simple form in my template:
HTML:
<form action="/pages/Testpage1" method="get" class="xenForm AutoValidator" data-redirect="on">
Your Location: <input name="form_location" type="text" value="{$visitor.location}" class="textCtrl autoSize" maxlength="5" size="5" />
<input type="submit" value="submit your entry" class="button primary" />
</form>
and a callback class method that is being called on form submit:
PHP:
public static function getThreads(XenForo_ControllerPublic_Abstract $controller, XenForo_ControllerResponse_Abstract $response)
{
$loc = (int)$controller->getInput()->filterSingle('form_location', XenForo_Input::STRING);
var_dump("YOUR LOC IS: " . $loc);
$threadIds = array();
$threads = $threadModel->getThreadsByIds(
$threadIds,
array(
'join' =>
XenForo_Model_Thread::FETCH_FORUM |
XenForo_Model_Thread::FETCH_USER,
'permissionCombinationId' => $visitor['permission_combination_id'],
'order' => 'post_date',
'orderDirection' => 'desc'
)
);
$response->params['threads'] = $threads;
$response->templateName = 'thread_list_modified';
}
in the js console I see the output of the var_dump from my method...
some one got a hint what's going wrong here?
thank you.