Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Empty" forms lack entity identifier when submitted #88

Open
kdambekalns opened this issue Sep 5, 2023 · 0 comments
Open

"Empty" forms lack entity identifier when submitted #88

kdambekalns opened this issue Sep 5, 2023 · 0 comments

Comments

@kdambekalns
Copy link
Member

When using a form like this for calling a delete action (deleteAction(Company $company)), the required argument is missing, even though props.company contains the correct entity:

<Neos.Fusion.Form:Form form.data.company={props.company} form.target.action={"delete"}>
    <button type="submit" class="neos-button neos-button-danger" title="Eintrag löschen">
        Ja, diesen Eintrag löschen
    </button>
</Neos.Fusion.Form:Form>

When "using" something from the entity like below, it works:

<Neos.Fusion.Form:Form form.data.company={props.company} form.target.action={"delete"}>
    <!-- Necessary to enable the delete method, without this hidden field the identity were -->                           
    <Neos.Fusion.Form:Neos.BackendModule.FieldContainer field.name="company[description]" label="">
        <Neos.Fusion.Form:Hidden/>
    </Neos.Fusion.Form:Neos.BackendModule.FieldContainer>

    <button type="submit" class="neos-button neos-button-danger" title="Eintrag löschen">
        Ja, diesen Eintrag löschen
    </button>
</Neos.Fusion.Form:Form>

Feels wrong to me…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant