What would be the best approach for dealing with fields that update each other?

For example, I have a location text field and a lat lon geofield that is set to automatically geocode from the location field.
I then set the lat lon field to #skip_edit and users can edit the location field.

When the user updates the location field and saves they see the new location data on the screen, however only the location field has refreshed so they cannot see the new lat lon field data until they refresh the page.

Thinking out loud, there could be something like a #dependants attribute that a developer could set so that if a field gets updated and it has #dependants set they would also be refreshed.

Comments

Wim Leers’s picture

Category: Support request » Feature request

In-place editing indeed assumes the various fields are independent of each other. There are cases where that's not true, but they're relatively rare.

I think we want to support this, but definitely not in a 1.0. We can collaborate on a patch here that adds support for it though.

The ideal solution looks like this: Field API has the metadata to indicate that field A is dependent on/calculated from the value of field B. Then Edit can take care of all this automatically.

Wim Leers’s picture

Status: Active » Postponed
Wim Leers’s picture

Project: Edit » Quick Edit
Version: 7.x-1.0-rc1 » 7.x-1.x-dev