Advertisement

How to create in XML file a field like array

For Joomla! 2.5 Coding related discussions, please use: http://groups.google.com/group/joomla-dev-general
Note: All 1.6, 1.7 and 3.5 releases have reached end of life and should be updated to 3.x.

Moderator: ooffick

Forum rules
Please use the mailing list here: http://groups.google.com/group/joomla-dev-general rather than this forum.
Locked
etonucci
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Thu Aug 08, 2013 12:32 pm

How to create in XML file a field like array

Post by etonucci » Tue Aug 27, 2013 12:48 pm

I try to create a field in the XML file like that

<input type="text" name="team[]">

so I write:

<field name="team[]" type="text" label="COM_ETMFT_PLAYER_TEAM_LABEL" description="COM_ETMFT_PLAYER_TEAM_DESC" />

but it doesn't work.

Please help me!!!
Thanks

Advertisement
User avatar
Ratmil
Joomla! Explorer
Joomla! Explorer
Posts: 318
Joined: Sat Dec 06, 2008 7:07 pm

Re: How to create in XML file a field like array

Post by Ratmil » Tue Aug 27, 2013 1:24 pm

Well, I have really never seen using array in XML form fields.

etonucci
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Thu Aug 08, 2013 12:32 pm

Re: How to create in XML file a field like array

Post by etonucci » Wed Aug 28, 2013 4:57 am

Thank you for the reply.

So what you want to say is that is not possible to create an array via xml.

I should to put a "team" textbox in the form with a button at the right.
When I press the button, with jQuery or Mootools, I've a new "team" textbox under the previous.
How can I do that with the definition of the field in the XML file?

User avatar
Ratmil
Joomla! Explorer
Joomla! Explorer
Posts: 318
Joined: Sat Dec 06, 2008 7:07 pm

Re: How to create in XML file a field like array

Post by Ratmil » Wed Aug 28, 2013 12:15 pm

I am just saying that as far as I know it is not possible.

User avatar
3dgtech
Joomla! Guru
Joomla! Guru
Posts: 546
Joined: Mon Feb 08, 2010 4:15 pm
Location: Cleveland, Ohio
Contact:

Re: How to create in XML file a field like array

Post by 3dgtech » Wed Dec 18, 2013 4:55 am

due to xml parsing all fields into the jform array, you have to escape the second array correctly.
so instead of using
arrayname[arrayindex]
you have to use
arrayname][arrayindex]

good luck.

Advertisement

Locked

Return to “Joomla! 2.5 Coding”