1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

The field 'X' was not recognised.

Discussion in 'XenForo Development Discussions' started by silence, Jul 16, 2014.

  1. silence

    silence Well-Known Member

    Alright so I'm extending XenForo_ControllerAdmin_User and my _getUserAddEditReponse function looks like so:
        protected function _getUserAddEditResponse(array $user)
            $response = parent::_getUserAddEditResponse($user);
            if (XenForo_Visitor::getInstance()->hasAdminPermission('viewTeamspeakCP'))
                $response->params['teamspeak']['identities'] = $this->_getAccountModel()->getAuthId($user['user_id']);
                $response->params['teamspeak']['servergroups'] = $this->_getGroupsModel()->getGroupListByAccessType('userid', $user['user_id']);
            return $response;
    The template code looks like this:
            <xen:if is="!{$teamspeak.identities}">
                <dl class="ctrlUnit inputBox">
                    <dt><label for="ctrl_auth_id">{xen:phrase teamspeak_change_identity}</label></dt>
                    <dd><input type="text" name="auth_id[]" value="{xen:phrase teamspeak_none}" id="ctrl_auth_id" class="textCtrl" /></dd>
            <xen:else />
                <xen:foreach loop="$teamspeak.identities" value="$value" i="$i">
                    <dl class="ctrlUnit inputBox">
                        <dt><label for="ctrl_auth_id">{xen:phrase teamspeak_change_identity} #{$i}</label></dt>
                        <dd><input type="text" name="auth_id[]" value="{$value}" id="ctrl_auth_id" class="textCtrl" /></dd>
                <input type="button" value="{xen:phrase teamspeak_add_identity}" class="button smallButton FieldAdder JsOnly" data-source="dl.inputBox"/>
    However when I type something into the text field, it gives me this error:

    What is causing this, I can't seem to figure it out :(
  2. Chris D

    Chris D XenForo Developer Staff Member

    Add a class of OptOut to any input which you do not want passing through the DataWriter.
    HWS and silence like this.
  3. silence

    silence Well-Known Member

    Thanks that did the trick!

Share This Page