Project

General

Profile

Actions

Bug #5599

closed

Value reset for file inputs does not function properly

Added by krileon about 9 years ago. Updated almost 9 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

Actions #1

Updated by krileon about 9 years ago

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.

Actions #2

Updated by krileon almost 9 years ago

  • 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

Actions #3

Updated by krileon almost 9 years ago

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

Actions #4

Updated by krileon almost 9 years ago

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.

Actions #5

Updated by krileon almost 9 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100
Actions #6

Updated by krileon almost 9 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF