Skip to main content

Questions tagged [subform]

Sub Form Field function is introduced in Joomla! 3.6. This function allows developer to nest XML forms inside each other or reuse existing forms inside the current form.

Filter by
Sorted by
Tagged with
0 votes
0 answers
15 views

Status of J_FILE Field Type for Subforms in Joomla

Hello Joomla Community, I’m reaching out to clarify the current status of the J_FILE field type in Joomla. Based on my research and discussions, it appears that Joomla has had ongoing issues related ...
user4571727's user avatar
0 votes
0 answers
16 views

J5 subform field with 100s of rows - how to paginate?

Using a subform field type on a component item edit view I may have 100s of rows with repeatable table layout. Is there a way to add pagination to the table? And also is there a way to provide a ...
RogerCO's user avatar
  • 81
0 votes
1 answer
15 views

Is there a way to autoload Forms / Fields in Custom J5 Module?

If I want to add a Subform to my Module I need to specify the "formsource" (path to xml) into my fieldsettings. But is there a way to use The Autoloader and "simply" use the Form ...
Marco's user avatar
  • 687
0 votes
1 answer
35 views

Is it possible to dynamically set fields on subforms

If I have a subform with the following xml structure <?xml version="1.0" encoding="utf-8"?> <form> <fieldset name="advkontentuser" > ...
James Wadsworth's user avatar
0 votes
2 answers
66 views

Store Custom Subform Field Value in DB

Note This is a follow up question upon Create Custom Form via SimpleXMLElement The first issue has been solved, the subform gets rendered, here is my CustomField Code: use Joomla\CMS\Factory; use ...
Marco's user avatar
  • 687
1 vote
2 answers
75 views

Params field value for extension in database is inconsistant when using subform & default values, it returns either a string or an object, how to fix?

I'm trying to write a plugin that needs to use the same subform twice, and I want to set different default values for these two subforms. The config part of my XML file looks like this: <config> ...
Marleen's user avatar
  • 111
1 vote
0 answers
42 views

Is there a JS event that gets fired when a subform row got moved / deleted?

When Adding a subform row (in the backend) it fires the "subform-row-add" event that can be observed with JS. I've tried default namings like "subform-row-moved", "subform-row-...
Marco's user avatar
  • 687
0 votes
1 answer
28 views

Set Field Value in Custom List field that is used inside a extended SubformField Class in Multiple Mode

My brain hurts, I'm using a custom listfield inside a subform in multiple mode, the rendering works as expected (two elements in database > two elements in the form). but i'm not able to set the ...
Marco's user avatar
  • 687
0 votes
0 answers
30 views

formsource only in subform field type?

So i need an XML form structure for a custom app that is used in different models. The most logical approach would be to create an external XML form file containing that structure and include it in ...
maidan's user avatar
  • 463
0 votes
2 answers
152 views

Retrieving text from a sub-form checkboxes field [joomla 4]

I get the value checkboxes:[film_rea], but I can't get the corresponding text [realisation]. <?php foreach ($this->item->jcfields as $field) { if ('films-pros' === $field->name &&...
Hdcms's user avatar
  • 51
1 vote
0 answers
105 views

Composing urls in a subform loop

It works but it is not great. It's about getting the fields of a subform to display the urls and other fields in a loop Today I have PHP code: <?php if (!empty($this->item->jcfields[111]->...
Hdcms's user avatar
  • 51
2 votes
2 answers
190 views

compose a url from an extract of a subform

I was able to compose a url from a subform that included text input fields. I was able to display the link because it was in the same menu <i class="fa fa-link fa-1x" aria-hidden="...
Hdcms's user avatar
  • 51
3 votes
1 answer
80 views

Prefill subform with data rows

Im trying to prefill my subform with datarows from the database. newcustomerform.xml <?xml version="1.0" encoding="utf-8"?> <form addfieldprefix="Mydestiny\Component\...
Jbadminton's user avatar
2 votes
0 answers
385 views

render Subform repeatable custom fields joomla4

I have created one subform custom fields in my Joomla 4 article from backend and selected media filed at subform and use this code for load custom fields at joomla article YOUR_JOOMLA_WEBSITE_ROOT/...
niaziblog's user avatar
  • 111
0 votes
1 answer
184 views

Layout override for repeatable subform custom field

I am trying to apply custom field override to my article and some of the fields I am trying to access are inside repeatable and non-repeatable subforms. Please how do I access and display subform ...
Chinecherem Kalu's user avatar
0 votes
1 answer
401 views

What is the correct PHP to render Subform repeatable custom fields on the front end?

When creating custom layout overrides the PHP code <?php echo $this->item->jcfields[X]->value; ?> Works successfully, but does not function at all when it comes to repeatable subform ...
Malkio's user avatar
  • 45
0 votes
1 answer
113 views

Custom form field in subform. How to access parent form fields?

I have created a custom file list form field and the field is used in a repeatable subform. The purpose of this custom form field is to display a list of files in folder based on 'name' field in main ...
barryssPL's user avatar
1 vote
2 answers
81 views

Create dynamic html markup from values in repeatable field json

In my custom component, I use a repeatable field. Sometimes it is possible that a url_partenaire element is an empty string because it is not mandatory. var_dump($this->item->...
Laurent's user avatar
  • 23
1 vote
2 answers
226 views

Access parent field value out of subform

I made a custom field and using it in a subform looking somewhat like this: <config> <fields name="params"> <fieldset name="basic" addfieldpath="/...
Mike's user avatar
  • 351
1 vote
2 answers
264 views

Joomla Subform adding row, the selector event is not fired if I change the value of the select element?

I have a subform which is working perfectly itself. If I add a new row (+), I have add the function as mentioned on joomla subform documentation: jQuery(document).on('subform-row-add', function(event, ...
user2363969's user avatar
0 votes
2 answers
328 views

Straight forward code example to save and retrieve the data for a Subform?

I hope that I may ask this, but is there a straight forward code example for a subform to save the data and to retrieve the data. What I have now is written an save function in controller/model with ...
user2363969's user avatar
1 vote
2 answers
167 views

Ordering subform data

Wondering if anybody has ever come up with a solution to this problem; my research tells me not. A bit convoluted explanation but hopefully you can understand... I have a component which has both ...
Grant G's user avatar
  • 714
1 vote
0 answers
170 views

Multiple Subform field in module - add multiple items at once

I have a mutliple subform field with radio buttons. All other fields load by showon of the related parent radio select. If there was added more than one item without saving successively, the radio ...
Marco's user avatar
  • 57
2 votes
1 answer
891 views

How to use Subform in nested Subforms

I want to use Showon in a nested XML file and I want to reference the original XML file's field name. I read that this is not possible in Joomla! Subforms because if I were to create the same ...
Eoin's user avatar
  • 2,033
0 votes
1 answer
207 views

Own field type in subform, using with content plugin

for curiosity: I'm using this method to add fields to the standard articles: https://docs.joomla.org/Adding_custom_fields_to_core_components_using_a_plugin/de I have to use this, since the fields-...
pixx's user avatar
  • 130
1 vote
2 answers
375 views

How display values from subform in front end?

I created a simple component with a subform that stores data in a database. Now I need to display this data on the front page. The data is displayed as is from db {"comment0":{"comment":"one"},"...
Nik's user avatar
  • 13
2 votes
1 answer
317 views

Javascript to update input checkbox in a Joomla subform

I have a repeatable subform, that has a number of checkboxes that are effected by the selections made in a list field that is also part of the subform. I added a onchange function the the list field ...
Llewellyn's user avatar
  • 401
2 votes
1 answer
2k views

How do I display the values from a subform

I have a sub form in my XML, which works fine in the back end, but I'm not sure of the best way to get the data out of the subform and display it. Here's part of my original XML <field ...
Eoin's user avatar
  • 2,033
3 votes
1 answer
568 views

Subform inside modal

I am using subform form field type inside my plugin parameters (I am reusing a form in several places of my plugin parameters, with success). What I really need to manage is to use each subform ...
n.h.'s user avatar
  • 871
4 votes
2 answers
2k views

Subform multiple data not saving

I'm trying to use the Joomla subform field with multiple="true" on (instead of using the old modal repeatable method). My problem is that the data is not saving to the database. I have read multiple ...
sigil's user avatar
  • 63
6 votes
2 answers
3k views

How to use a custom layout with JForm subform fields?

I want to reuse some forms in my component. The subform field does the job. However, I need to remove some fields and/or field groups when displaying the subform. I tried to use the JForm methods ...
nimble's user avatar
  • 418
2 votes
1 answer
595 views

Joomla 3.6 nested subforms not saving

I am trying to use the new subform feature to implement nested forms. This greatly increases the readability for developers and I thought it was already possible to do but after testing I am not so ...
purple11111's user avatar
2 votes
1 answer
1k views

use Joomla Subform field values in custom field from same module

I have the basic xml file where in I call subforms into two tabs. Called Tab 1 and Tab 2. The content of this file is below. mod_something.xml <fieldset name="tab1"> <field ...
purple11111's user avatar
0 votes
1 answer
171 views

Sub Form Field Frontend Editing Bug?

I have been playing around with the new Subform field. But it seems to be buggy in front end editing. If I delete or move an item and click save, one of the items will be duplicated and no items ...
jamesgarrett's user avatar
  • 3,329
5 votes
1 answer
352 views

Joomla 3.6 How to migrate data from repeatable to subform

The new field type subform does not retrieve old data repeatable, even fields have the same names. I created many posts with repeatable. The data are stored in extra fields of com_conent. attribs ...
Leoalv's user avatar
  • 167
1 vote
0 answers
909 views

Why doesn't my subform field data get saved?

I've been trying to debug this all day. I can't figure it out. My subform field: <field name="tricks" type="subform" formsource="administrator/components/com_test/models/forms/bagtrick.xml" ...
Alan Catterson's user avatar
9 votes
4 answers
3k views

How to get value from Sub Form

I want to embed a simple slideshow to my template, and I want to use subform to make easier to change the image. This is the code I use to call the child xml file <field name="slideshow_items" ...
webchun's user avatar
  • 2,418