Skip to content

"Empty" forms lack entity identifier when submitted #88

@kdambekalns

Description

@kdambekalns

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…

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