Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/joomla/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Joomla$this->;get(';Form';)返回NULL_Php_Joomla - Fatal编程技术网

Php Joomla$this->;get(';Form';)返回NULL

Php Joomla$this->;get(';Form';)返回NULL,php,joomla,Php,Joomla,我有一个视图views/detailedforms/view.html.php defined('_JEXEC') or die; jimport('joomla.application.component.view'); class Detailed_formViewDetailedforms extends JViewLegacy { protected $items; protected $pagination; protected $state; p

我有一个视图views/detailedforms/view.html.php

defined('_JEXEC') or die;

jimport('joomla.application.component.view');

class Detailed_formViewDetailedforms extends JViewLegacy {

    protected $items;
    protected $pagination;
    protected $state;
    protected $params;
    protected $form;

/**
 * Display the view
 */
public function display($tpl = null) {
    $app = JFactory::getApplication();

    $this->state = $this->get('State');
    $this->form = $this->get('Form');
    var_dump($this->form);
} 
和model models/forms/detailedforms.xml

<?xml version="1.0" encoding="UTF-8"?>
<form>
<fieldset name="contact" label="Detail_FORM">
    <field name="name"
        type="text"
        id="tailor-made-name"
        size="30"
        description="FORM_NAME_DESC"
        label="FORM_NAME_LABEL"
        filter="string"
        required="true"
    />
    <field name="email"
        type="email"
        id="email"
        size="30"
        description="EMAIL_DESC"
        label="EMAIL_LABEL"
        filter="string"
        validate="tailoremail"
        required="true"
    />

</fieldset>

$this->form返回null。请帮助,如何解决此问题。
由于此问题,模板文件中出现致命错误。

请尝试在$this->get('Form')上询问您的问题;php意味着它调用模型的函数(models/detailedforms.php)。分享你的模型,了解你缺少了什么?谢谢你的帖子,模型中没有定义表单函数。我的问题解决了。