Is there a way to programmatically add item to a repeater?
I have a section with a repeater. The section also has a header action. When the action button is click, im doing something in the background and then create an item in the repeater.
Could someone point me to the right direction.
TIA!
6 Replies
You can set the data for the repeater with the Get/Setting methods.
You could try setting traversly? so
$set('../../my_field', [data])
great! I'll try that out
Thanks @toeknee
okay, that would set the field of the repeater. My goal is to create Chapter when the "Ask AI to generate chapters" button is click
I am not familiar with the actions in this scenario, but you should be able to set the chapters by setting the field? so say you have chapters:
Thanks again @toeknee
hi @toeknee in your example above, the
my_field
is the id of the repeater?yeah