Skip to content

Conversation

@rdeutz
Copy link
Contributor

@rdeutz rdeutz commented Jul 28, 2017

Summary of Changes

This is pretty much the same as #15915 but only for field groups.

Com_categories has a nice little feature which allows the component developer to place a form file on /administrator/components/com_foo/models/forms/category.xml which get loaded when editing a category.

This pr introduces the same functionality for com_fields. If a file is found on the location /administrator/components/com_foo/models/forms/fieldgroup/item.xml then this file get loaded when the entity com_foo.bar is edited.

You have to name the fields params

<?xml version="1.0" encoding="utf-8"?>
<form>
    <fields name="params">
        <fieldset name="basic">
            <field
                    name="display"
                    type="text"
                    default=""
            />
        </fieldset>
    </fields>
</form>

Testing Instructions

Put the xml in a component with custom fields support into
/administrator/components/com_foo/models/forms/fieldgroup/item.xml

Item is the section, check https://docs.joomla.org/J3.x:Adding_custom_fields/Implement_into_your_component for details

Expected result

You should see a new tab Options in your fieldgroup edit form

optionen

Documentation Changes Required

Would be nice to have that feature documented.

@mbabker
Copy link
Contributor

mbabker commented Jul 28, 2017

Needs the install SQL but seems fine to me. If this can get tested today and tomorrow don't see any reason not to merge.

@rdeutz
Copy link
Contributor Author

rdeutz commented Jul 28, 2017

grrr, adding the install sql, I was sure I have forgotten something but couldn't figure out what :-)

@nielsnuebel
Copy link
Contributor

Looks good for me. Everything works

@laoneo
Copy link
Member

laoneo commented Jul 28, 2017

Should the update files not contain 3.8.0 as version number and end with a new line?

@rdeutz
Copy link
Contributor Author

rdeutz commented Jul 28, 2017 via email

@infograf768
Copy link
Member

I tried this on com_content and can't show the new field.

@nielsnuebel
Copy link
Contributor

@infograf768 change item.xml to article.xml .

@infograf768
Copy link
Member

Got it and I do get a new Option tab when editing a fieldgroup. But what can be the use of other Options in the fieldgroup itself? Any example that makes sense?

@infograf768
Copy link
Member

I have tested this item ✅ successfully on 298ffab


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17317.

@infograf768
Copy link
Member

RTC as it works as intended.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17317.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Jul 29, 2017
@infograf768 infograf768 added this to the Joomla 3.8.0 milestone Jul 29, 2017
@infograf768
Copy link
Member

@mbabker
Ready to go.

@rdeutz
Copy link
Contributor Author

rdeutz commented Jul 29, 2017

Think about a component where you have different fieldgroups, any of them should work a little bit different. With having the ability to add fields to the formgroup you can save the information how they should behave. Then you have to pick up the information in your overwrite/component and act accordingly.

@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Jul 29, 2017
@rdeutz
Copy link
Contributor Author

rdeutz commented Jul 29, 2017

Thanks all who have been worked on this :-)

@rdeutz rdeutz deleted the add_component_fields_to_fieldgroup branch July 29, 2017 15:42
izharaazmi added a commit to izharaazmi/joomla-cms that referenced this pull request Jul 29, 2017
* staging: (35 commits)
  Add filter by Tag to mod_article_category (joomla#16945)
  Change links
  Implement component params for fieldgroups (joomla#17317)
  Moved JLanguageMultilang::isAdminEnabled() to JModuleHelper::isAdminMultilang() (joomla#17314)
  Fix tests
  Namespace sodium cipher, use compat API
  Fix namespace use and class casing
  Various doc block fixes and removing unneeded imports
  Class mappings for internal classes that apparently aren't internal
  Don't load unexisting paths
  Cleanup and optimization in FinderIndexerDrivers (joomla#13511)
  Fix deleted files listing
  Deleted files updated
  Rename the document renderer base class
  Split feed data object classes to separate files
  Correct class name logic
  Deleted files for joomla#17278
  Namespace feed (joomla#17278)
  [CS] Required=true (joomla#17313)
  required = false is nnot required (joomla#17309)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants