I am trying to set a default value for the repeatable custom field. My subform has a number field, a media field and a text field.
I am using the default value field in the repeatable field configuration like this :

repeatble filed subform with default value

And this is what I tried for the default value :

"type":"2","Fichier":"images\/blog\/test.jpg","Description":"Default description"

I am somehow not getting the syntax right or maybe not using the right approach for this.
My aim is to have values already filled with content when adding new subforms while editing the articles here :

enter image description here

  • Can you not use default="xxxx" like you'd normally use for form fields?
    – Lodder
    Commented Jul 24, 2019 at 7:33
  • @Lodder no, that doesn't work. I tried the value stated in my question because that is what the rawvalue element returns when a field has been entered.
    – web-tiki
    Commented Jul 24, 2019 at 15:24
  • Can you share your code please?
    – Lodder
    Commented Jul 24, 2019 at 15:28
  • @Lodder I haven't coded anything in the backend. I am just using custom code to display the field values in a template overide. default="xxxx" works fine for the other custom fields (non repeatable text for example)
    – web-tiki
    Commented Jul 24, 2019 at 16:04
  • It would need to be in json format, try: {"type":"2","Fichier":"images\/blog\/test.jpg","Description":"Default description"} Commented Jul 25, 2019 at 22:39

1 Answer 1


So you would need to change it to be json and array based. Here is a rough example I setup as a default field which works as expected:


test0 is the in two parts, test is the name of the field and 0 is the field of the repeatable field.

the rest of it you can see matches similarly to what you have.

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.