As I've been digging into these modules I see a lot of redundant code that comes about because multiple value fields are treated as arrays and single value fields are not. As I look closely at it, it seems like you could easily re-write it so that single value fields are treated as the [0] element in an array. That way you could remove most of the redundant code, then do the processing by iterating through the array in all cases. You still have the multiple field value to use for times when you actually need to apply special processing for multiple values, but there really aren't too many places where anything different is being done for multiple value fields.

I would volunteer to make the changes if there is any interest.

Comments

ultraBoy’s picture

Category: feature » task

I'm second to that, also noticed redundant code.

JonBob’s picture

Status: Active » Fixed

I buckled.

This is done now. Saves 100 lines across the current module set.

Anonymous’s picture

Status: Fixed » Closed (fixed)