Trying to display article picker in subform

For Joomla! 3.x Coding related discussions, please use: http://groups.google.com/group/joomla-dev-general

Moderator: ooffick

Forum rules
Please use the mailing list here: http://groups.google.com/group/joomla-dev-general rather than this forum.
Post Reply
mixahlos
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 124
Joined: Sat Jul 22, 2006 9:52 pm
Contact:

Trying to display article picker in subform

Post by mixahlos » Sat Dec 30, 2017 9:22 pm

Hi,
I am creating a custom module and I want the user to be able to select multiple articles.

So what I did was to set a subform field and then load the xml which contains the modal article picker.

Code: Select all

        <field name= "articles"
          description= "Select Articles"
          type= "subform"
          label= "Select Articles"
          required= "true"            
          formsource= "modules/mod_articleblocks/models/forms/articles.xml"
          multiple= "true"
          buttons= "add,remove,move"
          layout="joomla.form.field.subform.repeatable-table"
          groupByFieldset="false"/>
And the xml file modules/mod_articleblocks/models/forms/articles.xml

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<form>
  <fieldset addfieldpath="/administrator/components/com_content/models/fields">
    <field 
      name="article_id" 
      type="modal_article" 
      default="" 
      label="" 
      description="" />
  </fieldset>
</form>
I also tried to place the field in a new fieldset in another tab with this code :

Code: Select all

<fieldset name="Articles" addfieldpath="/administrator/components/com_content/models/fields">
        <field name= "articles"
          description= "Select Articles"
          type= "subform"
          label= "Select Articles"
          required= "true"            
          formsource= "modules/mod_articleblocks/models/forms/articles.xml"
          multiple= "true"
          buttons= "add,remove,move"
          layout="joomla.form.field.subform.repeatable-table"
          groupByFieldset="false"/>
</fieldset>
with this xml :

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<form>
    <field 
      name="article_id" 
      type="modal_article" 
      default="" 
      label="" 
      description="" />
</form>
The result is the same, the modal article picker is displayed is not displaying any articles as you can see in the screenshots.
You do not have the required permissions to view the files attached to this post.
Mike

mixahlos
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 124
Joined: Sat Jul 22, 2006 9:52 pm
Contact:

Re: Trying to display article picker in subform

Post by mixahlos » Sun Dec 31, 2017 8:35 am

Mike


Post Reply

Return to “Joomla! 3.x Coding”