Is there a way to have the same field in an array when posting the data? Since I need the tabs in my component to be generated dynamically depending on the querys output, I can't enter them specifically into that file.
models/forms/myform.xml
<fieldset name="myset"
<field name="language" type="language" class="hidden" ...>
<field name="sometext" type="text" ...>
/>
view/myview/tmpl/default.php
foreach ($langs as $lang)
{
/* html */
$this->form->setFieldAttribute('language', 'default', $lang['name']);
echo $this->form->renderFieldSet('myset');
/* html */
}
would result in say this:
| English | German | French |
with a language and text field on each tab. The problem here is that when posting it just posts the last state, that would be the contents of 'French'. So is there a way to fix this and make joomla send an array or any better solutions to this issue?
Furthermore, is there a way to say Joomla to put that data into a stdObject because anything in that fieldset is related?