I have a simple form which is inside IFRAME. When user click on SUBMIT, it redirects to a specific page on my server. The function I use for the redirect is
For CakePHP 4, to redirect your parent page just add option 'target'=>'_top' in your iframe's link:
'target'=>'_top'
Example:
= $this->Html->link(__('Redirect Parent'), ['controller' => 'Users', 'action' => 'view'], ['target'=>'_top']) ?>
All the best!