CakePHP1.3:使用Ajax渲染问题

CakePHP1.3:使用Ajax渲染问题,php,cakephp,cakephp-1.3,render,formhelper,Php,Cakephp,Cakephp 1.3,Render,Formhelper,我希望在ajax响应中使用一个元素作为字符串 因此,我在控制器操作中添加了以下代码 $view = new View($this, false); $view->viewPath = 'elements/private_challenge/'; $res = $view->render('supporters_list_supporter'); 现在在我的支持者列表中,我填写了一份表格如下: echo $this->Form->create('R

我希望在ajax响应中使用一个元素作为字符串

因此,我在控制器操作中添加了以下代码

$view = new View($this, false);
$view->viewPath = 'elements/private_challenge/';            
$res = $view->render('supporters_list_supporter');
现在在我的支持者列表中,我填写了一份表格如下:

echo $this->Form->create('RequestFrHelpReply',array('action'=>'add_helpreq_reply','class'=>'form','id' => 'helprequestreplyaddfrm','name'=>'helprequestreplyaddfrm')); 

 echo $this->Form->hidden('PrivateChallengeRequestHelp.ReqID',array('value'=>$supporterlist['RequestFrHelp']['REQID']));
 echo "<div class='alignleft'>";
 echo $this->Form->input('PrivateChallengeRequestHelp.txt_helpreq_reply', array('label'=>false,'type' => 'textarea', 'id'=>'txt_helpreq_reply','escape' => false, 'div' => false, "class"=>"textarea request-help-textarea",'onKeyDown'=>'textCounterComment(this.form.txt_helpreq_reply,this.form.remLenth,'.Configure::read('CommentSetting.comment_body_max_limit').',\'remLenthDiv\');', 'onKeyUp'=>'textCounterComment(this.form.txt_helpreq_reply,this.form.remLenth,'.Configure::read('CommentSetting.comment_body_max_limit').',\'remLenthDiv\');'));
  echo "</div>";
  echo '<span class="request-arrow"></span><span class="user-name"> : '.$html->get_users_username($session->read('Auth.User.id')).'</span>';
 echo $html->link(__l('Reply'),'#',array('id'=>'helpreq_reply_link','class'=>'request-help-button alignleft','title'=>__l('Reply'),'escape'=>false,'onclick'=>'helpreq_reply(\'reply\');return false;'));               
 echo "</div>";     
 echo $this->Form->end();
echo$this->Form->create('RequestFrHelpReply',array('action'=>'add\u helpreq\u reply','class'=>'Form','id'=>'helprequestreplyaddfrm','name'=>'helprequestreplyaddfrm');
echo$this->Form->hidden('PrivateChallengeRequestHelp.ReqID',数组('value'=>$supporterlist['RequestFrHelp']['ReqID']);
回声“;
echo$this->Form->input('privatechallengerequeselp.txt\u helpreq\u reply',array('label'=>false,'type'=>'textarea','id'=>'txt\u helpreq\u reply','escape'=>false,'div'=>false,'class'=>“textarea请求帮助textarea”,'onKeyDown'=>'textccountercomment(this.Form.txt\u helpreq\u reply,this.Form.remLenth',.Configure::read('CommentSetting.comment\u body\u max\u limit')、'remLenthDiv\')、'onKeyUp'=>'textCounterComment(this.form.txt\u helpreq\u reply,this.form.remLenth',.Configure::read('CommentSetting.comment\u body\u max\u limit')、'remLenthDiv\););
回声“;
echo':'.$html->get_users_username($session->read('Auth.User.id'))。';
echo$html->link('Reply'),'helpreq'Reply'link','class'=>'request-help-button-alignleft','title'=>'Reply'),'escape'=>false,'onclick'=>'helpreq'Reply(\'Reply\);返回false;);
回声“;
echo$this->Form->end();
因此,它给了我一个与表单帮助器丢失相关的错误,那么有人能帮助我如何用这个exetrnal对象添加表单帮助器吗

更新:错误消息:

   $view = stdClass
   stdClass::$modelScope = false
   stdClass::$entityPath = "RequestFrHelpReply."</pre><pre class="stack-trace">Helper::setEntity() - CORE\cake\libs\view\helper.php, line 422
   FormHelper::create() - CORE\cake\libs\view\helpers\form.php, line 217
   include - APP\views\elements\private_challenge\help_request_form.ctp, line 21
$view=stdClass
stdClass::$modelScope=false
stdClass::$entityPath=“RequestFrHelpReply.”Helper::setEntity()-CORE\cake\libs\view\Helper.php,第422行
FormHelper::create()-CORE\cake\libs\view\helpers\form.php,第217行
包括-APP\views\elements\private\u challenge\help\u request\u form.ctp,第21行
你有

public$helpers=array('Form');


在您的控制器中?

您能将错误消息完全粘贴到屏幕上吗?请检查我的更新:错误消息:仍然看不到缺少“表单帮助程序”…这就是消息的全部内容吗?