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

Nested FormBuilder forms in FileLink get submitted at the same time #114

Closed
emteknetnz opened this issue Nov 2, 2023 · 1 comment
Closed

Comments

@emteknetnz
Copy link
Member

emteknetnz commented Nov 2, 2023

May not be relevant depending on whether the FileLink changes back to using the InsertMediaModal.

This related to the currently unmerged PR to add use FormSchema submissions

Clicking a submit button a couple of different forms in a couple of scenarios on selecting a File to link to will also submit the Link Form in the modal. At this point the UploadField won't have a file selected the FileLink will have a FileID of 0.

  • Clicking the "Insert File" button that shows below a certain breakpoint (rather than "Insert" button) on the fileSelectForm (i.e. file details form that shows when you select a file from the gallery
  • Click the save/publish button on the from that shows after clicking the "details" top-right button of the fileSelectFrom

You can see this behavior by putting a debug breakpoint in FormBuilder.js::handleSubmit()

May actually be a bug with redux-form itself where the forms are listening to submit buttons emitting from entirely different forms.

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

No branches or pull requests

1 participant