php - CakePHP fails loading $ajax->form with Error 503 Service Unavailable -
When I add a $ ajax-> If the form () calls me within my view, the server responds: Error 503 service is unavailable.
I have loaded:
app :: import ('Ajax'); $ Ajax = new Ajax Helper (); Form (array ('type' = & gt; 'post', array ('type' = & gt; 'post', 'option' = & gt; array ('model' = & gt; 'user', 'update '= & Gt;' dateTarget ',' url '= & gt array (' Admin '= & gt;' comments', 'verb' => 'edit')));
I think there is only one error: from within
it should be noted that
Undefined property: AjaxHelper :: $ form I tried singing: get_class_methods ($ ajax) and it shows that the form is available.
How can I give advice on how to proceed from here?
Thank you!
Ajax Helper depends on formhelper (plus HTMLHelper and JavaScriptHelper). If you also manually create an example of AjaxHelper, then you also have to make those dependencies (depending on the functionality you use ). It has been done as follows:
App :: Import ('Ajax'); $ Ajax = ne W AjaxHelper (); $ Ajax- & gt; Form = new formhelp (); However, the helpers you usually use are added to the $ helper array of your controller:
public $ helpers = Array ('Ajax'); Also view
Comments
Post a Comment