How to get FieldSet of a group (in an XML form definition)?

81 views
Skip to first unread message

PGS

unread,
Jan 31, 2016, 11:55:56 AM1/31/16
to Joomla! General Development
I have two groups, they have a fieldset with the same name:
<fields  name = "group1" >
   
<fieldset  name = "fieldset1" >
   
<fieldset>
<fields>

<fields  name = "group2" >
   
<fieldset  name = "fieldset1" >
   
<fieldset>
<fields>

How can I get the fieldset 'fieldset1' of group2?

I tried
$form->getFieldSet( 'fieldset1');

and
$form->getFieldSet( 'fieldset1', 'group2');

Returns both fields.


Troy Hall

unread,
Jan 31, 2016, 9:00:13 PM1/31/16
to joomla-de...@googlegroups.com
why not just have 2 different names for the sets?
Bear
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-gene...@googlegroups.com.
To post to this group, send email to joomla-de...@googlegroups.com.
Visit this group at https://groups.google.com/group/joomla-dev-general.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted
Message has been deleted
Message has been deleted

PGS

unread,
Feb 1, 2016, 2:24:56 AM2/1/16
to Joomla! General Development
Yes,  I know I can do this, that's how I have it till now.
But I wanted to do this for better organization.

I found out that in orer to get the fieldset...I 'll have to get the...group:
$field = $form->getGroup( $group,$fieldset);

It looks like it does the job.
Reply all
Reply to author
Forward
0 new messages