costume field duplicated

7 views
Skip to first unread message

Sven Schultschik

unread,
May 15, 2012, 7:46:21 AM5/15/12
to joomla-de...@googlegroups.com
Aloha all together,

I've created a costume field an that is now shown duplicated in some forms.

    protected function getInput()
    {
        $html = '<div class="';
        $html .= $this->element['class'] ? (string)$this->element['class'] : '';
        $html .= '"><span class="labeltitle">';
        // Get the label text from the XML element, defaulting to the element name.
        $text = $this->element['label'] ? (string)$this->element['label'] : (string)$this->element['name'];
        $html .= $this->translateLabel ? JText::_($text) : $text;
        $html .= '</span> <span class="hinweis_text">';
        $html .= $this->translateDescription ? JText::_($this->description) : $this->description;
        $html .= '</span></div>';

        return $html;
    }

Anyone an idea why that happens?

elin

unread,
May 15, 2012, 8:35:10 AM5/15/12
to joomla-de...@googlegroups.com
The input shows twice? Or the label?Or both? 
Are you saying it doesn't always happen?
Are you outputting it in a loop or explicitly?

Elin

Elin

Sven Schultschik

unread,
May 15, 2012, 9:11:10 AM5/15/12
to joomla-de...@googlegroups.com
The input is shown twice. Label does not exist, the function returns a empty string.

Yes it happens only on the last form piece. I have per step one xml file. The step where it occurs is loaded by normal php. The fields are created throw a loop. On the form which get loaded by ajax it apears one time.

Looks like

field1
field2
field1 where it belongs to
... other fields ...
field2 where it belongs to
... other fields ...

Sven

2012/5/15 elin <elin....@gmail.com>
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/BISecklMZYMJ.
To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.

Reply all
Reply to author
Forward
0 new messages