-
-
Notifications
You must be signed in to change notification settings - Fork 387
Open
Labels
DocumentationImprovements or additions to documentationImprovements or additions to documentationStalled
Description
The following is not documented and may be confusing:
- Before the AJAX request exactly how POST PAYLOAD DATA (by the data-live-props-value) are built to be submitted
- After the AJAX what data-live-props-value html attribute will finally be.
I ask this because I came accross with the following:
- I have a live form with ChoiceType (datetimes)
- AJAX is called (because I pushed the button submit)
- My datetimes (ChoiceType) were updated during PRE_SUBMIT event, because of they are dynamic
- All the possible choices not contain PAYLOAD[datetime] because it's already doesn't exist among choices, as a result normalized version of the data is
null
because of the default ChoiceType data transformer - AJAX is finished and I have the old datetime in the data-live-props-value attribute, because it was not changed via frontend but because of the internal logic choices changed (in the PRE_SUBMIT event) I have
null
model data - FINALLY: I have
null
model datetime data, but I expected I was the first element of the choice
To solve this I needed to empty formValues before form creation to make data-live-url-value contain first choice element instead of the old currently non-existent element in the choice
But currently it's not clear
In case I did NOT empty formValues before the form creation I would constantly get empty normalized data in my MODEL/ENTITY because data-live-props-value html attribute would constantly contain old non-existent choice unless it was selected from frontend (in this case it would be updated as normal)
Metadata
Metadata
Assignees
Labels
DocumentationImprovements or additions to documentationImprovements or additions to documentationStalled
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
carsonbot commentedon Sep 21, 2025
Thank you for this issue.
There has not been a lot of activity here for a while. Has this been resolved?
carsonbot commentedon Oct 5, 2025
Hello? This issue is about to be closed if nobody replies.