1. 먼저 양식 XML 파일을 확인
프런트 엔드 경로 형성 D 경로 : administrator\components\com_<name_of_component>\models\forms\<formname>.xml
예 (줌라 3.4.3) : administrator\components\com_users\models\forms\group.xml
<?xml version="1.0" encoding="utf-8"?>
<form>
<fieldset>
<field name="id" type="hidden"
default="0"
required="true"
readonly="true"
/>
<field name="title" type="text"
required="true"
description="COM_USERS_GROUP_FIELD_TITLE_DESC"
label="COM_USERS_GROUP_FIELD_TITLE_LABEL"
size="40"
/>
<field name="parent_id" type="groupparent"
description="COM_USERS_GROUP_FIELD_PARENT_DESC"
label="COM_USERS_GROUP_FIELD_PARENT_LABEL"
required="true"
/>
<field name="actions" type="hidden"
multiple="true"
/>
<field name="lft" type="hidden"
filter="unset"
/>
<field name="rgt" type="hidden"
filter="unset"
/>
</fieldset>
</form>
2. 확인 모델 클래스
getForm()
양식을로드 할 책임이 방법 (양식 XML- 파일).
프런트 엔드 경로 : components\com_<name_of_component>\models\<modelname>.php
백엔드 경로 : administrator\components\com_<name_of_component>\models\<modelname>.php
예 (줌라 3.4.3) : administrator\components\com_users\models\group.php
/**
* Method to get the record form.
*
* @param array $data An optional array of data for the form to interogate.
* @param boolean $loadData True if the form is to load its own data (default case), false if not.
*
* @return JForm A JForm object on success, false on failure
*
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
{
// Get the form.
$form = $this->loadForm(
'com_users.group',
'group',
array(
'control' => 'jform',
'load_data' => $loadData)
);
if (empty($form))
{
return false;
}
return $form;
}
https://github.com/joomla/joomla -cms/pull/2536 이 링크를 확인하십시오. –
xml 파일을 검사 할 때 오류가 없습니다. –
solved..thnksss –