Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In a file component, the user is not shown the list of acceptable file extensions. If they submit a file with an extension not on the list, they will get an error message with the list. It would be better UI to give the user this information in advance.
I suggest Webform add text such as the following to the description for file components:
Allowed file extensions: jpg, png, gif.
Comment | File | Size | Author |
---|---|---|---|
#4 | webform_2106849_show_allowed_files.patch | 484 bytes | Liam Morland |
#2 | webform_2106849_show_allowed_files.patch | 644 bytes | Liam Morland |
Comments
Comment #1
Liam MorlandLikewise, the maximum file size should be shown.
Comment #2
Liam MorlandFix.
Comment #3
quicksketchThanks Liam! This has been one of those things I've been wanting to do for a long time.
Rather than making our own message, maybe we should reuse the theme_file_upload_help() function provided by file.module?
Comment #4
Liam MorlandA very sensible suggestion! See attached.
Comment #5
quicksketchSuper. Finally committed. Thanks again Liam.
Comment #7
fenstratNeeds porting to 8.x-4.x.
Comment #8
fenstratNeeds porting to 8.x-4.x.
Comment #9
fenstratCommitted and pushed 9bc891c to 8.x-4.x. Thanks!