Originally requested here: https://github.com/farmOS/farm_area/issues/2

For the logging of anything it would be nice if the area was a dropdown of all areas that have been added. I think having as many fields as dropdown as there can be would be very helpful.

My response:

I agree! This would not be a difficult change to make. When I originally created the area reference fields, I decided to make them use Drupal's "Autocomplete (free tagging)" widget type - because it allowed you to EITHER select an existing area, OR create a new one, all with the same field. This is convenient, but I think in most cases people will (and maybe should) create their areas ahead of time, and then reference them from the logs - so the ability to create new areas on-the-fly may not be necessary (or advisable). We could make this change quite simply by changing the widget to a dropdown, which is an option provided by Drupal core already.

Comments

m.stenta created an issue. See original summary.

m.stenta’s picture

See also: #2758907: Area reference fields have 128 character limit

I closed that issue in favor of this one. I think a dropdown is a nice simple first step, and we can reasses when areas become assets (#2363393: Make "Area" into a type of Farm Asset) - most likely in Drupal 8 (#2361735: [META] Map out Drupal 8 / farmOS 8.x-2.x Dependencies).

m.stenta’s picture

I believe the dropdown widget has the option of including hierarchy in it as well, so we should definitely enable that option - it will make browsing a long list of areas easier.

m.stenta’s picture

  • m.stenta committed 5ccc35f on 7.x-1.x
    Update movement logs to use dropdowns for area reference fields (Issue #...
m.stenta’s picture

Status: Active » Fixed

These are both merged. Case closed! Thanks @kadaan.

Status: Fixed » Closed (fixed)

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

m.stenta’s picture

Project: Farm Log » farmOS

Moving old issues to the canonical farmOS project for easier searching. Apologies for email spam if anyone is following these. :-)