Project

General

Profile

Actions

Bug #5599

closed

Value reset for file inputs does not function properly

Bug #5599: Value reset for file inputs does not function properly

Added by krileon about 10 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
High
Assignee:
Target version:
Start date:
09 November 2015
Due date:
% Done:

100%

Estimated time:

Description

Resetting the value of a file input causes the input to break on initial submit resulting in no file selection submitting.

https://www.joomlapolis.com/forum/153-professional-member-support/231722-little-bug-in-cb-conditional?start=6

Updated by krileon about 10 years ago Actions #1

To test condition avatar to show on a field value equaling a specific value while the avatar field is required. Initial display should be hidden. Now cause it to display and attempt to upload. Required validation error will then be thrown.

Updated by krileon almost 10 years ago Actions #2

  • Priority changed from Normal to High

Set a file field to required, condition it to show based off another fields value, attempt to register and toggle its display, registration will fail with a required error, turn off value reset, retest, it now works fine. The issue appears to be entirely related to the jQuery doing the value reset.

https://www.joomlapolis.com/forum/153-professional-member-support/232431-5599-error-message-with-cb-conditional-in-the-case-of-file-type-required-field#276212

Updated by krileon almost 10 years ago Actions #3

Disabling value resetting works around the issue for now, but you lose value resetting functionality.

Updated by krileon almost 10 years ago Actions #4

It's due to the __choice input being reset then on upload there's no choice selected resulting in the upload failing as the __choice was changed from "upload" to empty. Hidden inputs shouldn't have their values reset.

Updated by krileon almost 10 years ago Actions #5

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100

Updated by krileon almost 10 years ago Actions #6

  • Status changed from Resolved to Closed
Actions

Also available in: PDF Atom