Skip to content

Problem with Layers #8

@pauloffb

Description

@pauloffb

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions