Get Repeater data for form save

hi all I have an Estimate Model and I'm using a form with a repeater to show all EstimateCosts records associated. I can view and save these no problem. However, I want to be able to access all the repeater records before saving. They dont appear in the $data var. My aim is to add all the 'price' fields from the repeater and save them to a field on the Estimate record. Any help would be greatly appreciated.
2 Replies
Dennis Koch
Dennis Koch6mo ago
Sounds like you are using ->relationship() which saves directly to relationship. If you want to do the this yourself, you can omit ->relationship() and/or use some of the hooks
David | Fortune Validator
Im happy for the saving to the relationship Model to be automatic. I just wanted to grab that data to run some logic so I could save it to the parent Model first ( the model that the Form intiates from ) hooks wise whilst using the ->relationship(), I couldn' find anything that showed me the data inside the Repeater before saving
Want results from more Discord servers?
Add your server