How to add an row to a repeater programmatically?
Hello!
I am creating a HasMany relationships in my DB. Fields are displayed dynamically. Can I make it so that each new field is a new repeater line? It's as if the user clicked the "Add" button. I need each field value_string, value_integer to be a new attribute connection record. Perhaps I should use a different component? Thank you!
5 Replies
I don't want to change the values. I want to add rows so that each of my fields is a new repeater row.
If there are 5 repetitions in my loop, I want to have 5 records in attributes.
Now after going through the cycle we get the following diagram:
Repeater => ['rule_attribute_id', 'value_integer', 'value_integer', 'value_string']
I would like to get:
Repeater => [['rule_attribute_id', 'value_integer'], ['rule_attribute_id', 'value_integer'], ['rule_attribute_id', 'value_stirng']]
So get the values and merge them?
I would like to get this behavior - each field is a new record in the table attributes and new row in repeater
And what I get is this: all fields are part of one record DB and one row in repeater