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
如何在我的后端组件joomla表单中上载多个图像_Joomla_Components - Fatal编程技术网

如何在我的后端组件joomla表单中上载多个图像

如何在我的后端组件joomla表单中上载多个图像,joomla,components,Joomla,Components,我正在开发一个组件在J!2.5并且希望在后端添加一个浏览按钮,以便用户可以选择他们以前上载的文件,但是当我使用form.xml中的媒体类型时,我只能上载一张图片 我在xml文件中使用下面的代码,但我只能上传一张图片? 我该怎么办 在XML中,必须定义新元素 <field name="image" type="myelement" label="" description="" class="inputbox" /> 现在在该文件中创建类 <?php defined('_JE

我正在开发一个组件在J!2.5并且希望在后端添加一个浏览按钮,以便用户可以选择他们以前上载的文件,但是当我使用form.xml中的媒体类型时,我只能上载一张图片

我在xml文件中使用下面的代码,但我只能上传一张图片? 我该怎么办


在XML中,必须定义新元素

<field name="image" type="myelement" label="" description="" class="inputbox" /> 
现在在该文件中创建类

<?php
defined('_JEXEC') or die();

jimport('joomla.html.html');
jimport('joomla.form.formfield');

class JFormFieldMyelement extends JFormField
{
    public $type = 'Myelement';

    public function getInput()
    {

    }
} 

<?php
defined('_JEXEC') or die();

jimport('joomla.html.html');
jimport('joomla.form.formfield');

class JFormFieldMyelement extends JFormField
{
    public $type = 'Myelement';

    public function getInput()
    {

    }
}