Skip to content
Discussion options

You must be logged in to vote

Based on the information provided in the knowledge sources, there isn't a direct way to prefill repeatable fields with specific items as you've described. However, I can suggest a potential workaround that might help you achieve a similar result.

The repeatable field in Backpack allows you to define a default number of rows or items when the field is first displayed. You can use the init_rows attribute to set this. For example:

[
    'name'  => 'repeatablefield',
    'label' => 'Repeatable Field',
    'type'  => 'repeatable',
    'init_rows' => 3, // This will create 3 empty rows by default
    'subfields' => [
        // Your subfields here
    ]
]

This approach will create empty rows, b…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Mte90
Comment options

@Mte90
Comment options

@tabacitu
Comment options

Answer selected by Mte90
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants