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 examples but cannot see what I'm doing wrong.

If I turn off multiple="true" then the subform saves data as a JSON string to the database just fine. When I turn it back on, it won't save no matter what I try.

My issue is basically this one, but there were no solutions and I don't have enough reputation to simply comment on it: Why doesn't my subform field data get saved?

My component XML:

<field name="list_links_url" 
        label="Subform Field" 
        description="Subform Field Description"

Subform XML:

<?xml version="1.0" encoding="UTF-8"?>
        <field name="link"
            description="Enter a URL" 

FYI - Brand new install of Joomla 3.6.5 and PHP 7.0.10

Any help would be greatly appreciated.

  • There is nothing wrong with the code you posted above. Can you say where you are using it? Frontend or backend? In config or passing it to a controller task? etc. Feb 20, 2017 at 7:53

2 Answers 2


In your table's bind function, add this:

if ( ( !empty( $array[ 'list_links_url' ] ) && ( is_array( $array[ 'list_links_url' ] ) ) ) ) {
            $this->_jsonEncode[] = "list_links_url";
  • This is the closest to a solution I've come across, thanks for taking the time. In the end I've chosen to use the old repeatable method but this is still useful, thanks.
    – sigil
    Apr 24, 2017 at 18:11

I know this is an old issue, but since a came across this post on my own research I would like to share my solution. Unfortunately I cannot trace back at which Joomla version this possibility was implemented.

Just add the following line to the beginning of your corresponding table class. With this information the bind method of the Joomla core table class will convert the specified fields by itself.

protected $_jsonEncode = array('fieldname');

In the end its the same as in Stuart Steedman post, but you don't have to override the core bind method.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.