php-unpoly icon indicating copy to clipboard operation
php-unpoly copied to clipboard

Problem with Layers

Open pauloffb opened this issue 2 years ago • 1 comments

Hi, I've been trying to use unpoly with laravel, by replicating the unpoly demo app. But when I try to open a form in a new modal layer, on submit I cannot make it work properly.

On successfull form submit I want it to close the modal and update the root layer and on validation errors, I want it to show the errors inside the modal.

If I have this: <form action="{{route('products.store')}}" method="post" up-submit >

The errors show up on modal, but on successfull submit the modal is kept open.

If I change it to: <form action="{{route('products.store')}}" method="post" up-layer="parent" >

The modal is closed, which is OK on successfull submit, but the same happens when there are validation errors, because the form is now open in main layer.

Has anyone already done this?

pauloffb avatar Aug 25 '22 15:08 pauloffb