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" min="0" max="1000" multiple="true" buttons="add,remove,move"
    layout="joomla.form.field.subform.repeatable-table" groupByFieldset="true" 
    label="Models" description="Subform Field Description" />


<fieldset name="homemodelsrent" label="Home Models and Rent" repeat="true">
    <field name="homemodel" 
        label="Home Model" 
        description="Choose a home model"
        query="SELECT id, concat(title, ' - ',model) as composite_title from fd9un_test_tricks" 
        value_field="composite_title" >
    <field name="price"
        description="Enter rental price for this home model at this community"
        type="text" />

It appears to work fine. enter image description here But when I save the form, the information is not saved. enter image description here My table has a column named 'tricks'. It is empty, no matter what I do.

Any thoughts greatly appreciated.

  • Added the following to my components table class bind function and it works. if((!empty($array['tricks'])&&(is_array($array['tricks'])))) { $this->_jsonEncode[]="tricks"; } Jul 29 '16 at 1:57
  • I have the same problem, although your solution looks ok, I would like to find the official way to do it. At least, the hidden field to store the value is added as in the repeatable field, so i guess there has to be some missing js that would do the job automatically.
    – spacebiker
    Sep 26 '16 at 18:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.