Joomla从Form Field获得课程

时间:2015-01-17 10:54:27

标签: forms class joomla field components

我有一个像这样的Joomla字段:

<field 
    name="visible"
    type="list"
    label="COM_VISIBLE"
    description="COM_VISIBLE_TOOLTIP"
    class="inputbox">
        <option value="0">COM_HIDDEN</option>
        <option value="1">COM_VISIBLE</option>
 </field>

如何获取类属性?

$field->label and $field->input it's ok... 
but with 

    JFormFieldList
    JFormFieldMedia
    JFormFieldHidden
    JFormFieldMedia  

return "Undefined property: JFormFieldList::$class in... ()"

否则它是空的

1 个答案:

答案 0 :(得分:1)

已解决

$class = $this->form->getFieldAttribute($field->fieldname, 'class', '', $field->group); –