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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Les Lim’s picture

FileSize
798 bytes

That's a pretty simple change to the db_query populating the autocomplete field. Here's a patch.

Les Lim’s picture

Status: Active » Needs review
quicksketch’s picture

Status: Needs review » Reviewed & tested by the community

Works for me. I'll put this in next time I'm working on FileField Sources.

drewish’s picture

i kind of would prefer this be an option like cck offers with node references.

quicksketch’s picture

Status: Reviewed & tested by the community » Needs work

Now 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.

antiorario’s picture

Status: Closed (fixed) » Needs review
FileSize
3.13 KB

Since 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.

quicksketch’s picture

Assigned: Unassigned » antiorario
Status: Needs work » Fixed
FileSize
2.62 KB

Thanks antiorario! I cleaned up the formatting a bit and changed it from being a checkbox to being radio buttons for clarity.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Status: Needs review » Closed (fixed)