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

FlexibleImageWidget resets when form is re-rendered due to validation error on another form field #3558

Open
amickan opened this issue Sep 23, 2024 · 0 comments

Comments

@amickan
Copy link
Contributor

amickan commented Sep 23, 2024

Describe the bug
On job creation (or display set / archive item creation / updating), if a user selects an image or uploads a new one and some other interface field in the form fails validation, the image choice isn't remembered and the user has to reupload or reselect the image on the returned form.

To Reproduce
Steps to reproduce the behavior:

  1. Create an algorithm with at least two inputs: one image input and, e.g. a number input.
  2. Upload an image or select an existing image for the image interface. Enter invalid input for the second interface.
  3. Click 'Submit'
  4. The form will be re-rendered, displaying the validation error for the second input. The FlexibleImageWidget will now be empty, and you will need to re-select an image or re-upload an image for that interface before being able to re-submit.

Expected behavior
The FlexibleImageWidget should remember the user's choice and should be prepopulated accordingly.

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