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.
Current behaviour of autocomplete is to search for the start of a filename
while this is useful but very strict and sometimes not practical
node reference and user reference can search for a match within the name
not only in the beggining
if that was possible it would be great
Comment | File | Size | Author |
---|---|---|---|
#6 | filefield_sources-600888.patch | 3.13 KB | antiorario |
#7 | filefield_source_reference_match.patch | 2.62 KB | quicksketch |
#1 | filefield_sources_600888.patch | 798 bytes | Les Lim |
Comments
Comment #1
Les LimThat's a pretty simple change to the db_query populating the autocomplete field. Here's a patch.
Comment #2
Les LimComment #3
quicksketchWorks for me. I'll put this in next time I'm working on FileField Sources.
Comment #4
drewish CreditAttribution: drewish commentedi kind of would prefer this be an option like cck offers with node references.
Comment #5
quicksketchNow that we have #436174: Configuration Options, we can actually make this an option. I agree with drewish, it makes most sense as an option rather than being one or the other.
Comment #6
antiorario CreditAttribution: antiorario commentedSince I added this feature by default to my patch in #436174: Configuration Options, I thought I'd work on it and give it an actual configuration option, as quicksketch suggested. Here's the patch. I modified a line in the module, which wasn't saving source settings before.
Comment #7
quicksketchThanks antiorario! I cleaned up the formatting a bit and changed it from being a checkbox to being radio buttons for clarity.