Matzn Posted October 20, 2020 Share Posted October 20, 2020 Hi. I need the repeater id by a field inside the repeater via api. $repeater = $page->my_repeater; foreach ($repeater as $row) { if ($row->id == "repeater->myField->inside_the_repeater_row"){ ..someting } } For a selected field i need it, but a chikld from a other selected field. Maybe you have a better idea? $wire->addHookAfter('InputfieldPage::getSelectablePages', function ($event) { if ($event->object->hasField == 'productOptionValue') { $page = $event->arguments('page'); $options = $page->product_options; foreach ($options as $option) { if ($option->id == "285110") { $selector = 'parent=' . $option->product_option_key; } } $event->return = $event->pages->find($selector); } }); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now