Closed (fixed)
Project:
Address Field
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
25 Jun 2012 at 15:12 UTC
Updated:
8 Dec 2013 at 02:20 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
hasozduru commentedComment #2
rszrama commentedThis was in the right spot. The issue is that we either need the "Name (First name, Last name)" option to combine the first and last name into the single name line column on save or we need the formatter to be able to use the right data depending on the option selected for name entry.
Comment #3
hasozduru commentedThanks rszrama
I am not familiar with patches yet so would be great if you could provide one that fixes it.
Comment #5
kgrigsby@mac.com commentedI use the Address Field module with separate first and last name fields in the user's profile without Commerce. I have a View which displays the users and would like to have a a single filter field that searches on the combined first and last name. As it is right now I have a fields for the first and last name. I think if the combined name was stored on save it would make this possible.
Comment #6
hasozduru commentedrszrama, any update on this please?
Comment #7
rszrama commentedNone, but it's been annoying me on my site, too. Obviously, this issue will be updated when there's an update.
Comment #8
mediapal commentedOMG I just stumbled into the same issue and here I realize this is going on since 10 Months. C'mon guys please give us a fix.
Comment #9
rszrama commentedI'd never turn away a patch. ; )
It's been bugging me for longer than this issue was posted, just never had the opportunity / luck to track it down.
Comment #10
rszrama commentedI'm co-opting two other feature requests into this issue and retitling it to be more clear about the fix.
Comment #11
MVRider commentedI'm still seeing this issue. Has this been fixed or should I tackle it?
Comment #12
malovanets commentedHello guys.
Hopefully this patch would solve the issue.
Comment #13
malovanets commentedI edited my patch a little, just to match the coding standards
Comment #14
rszrama commentedI think you intended something different with this if statement:
As written, it's performing the same conditional check twice. Perhaps you meant to look for a last_name?
However, what happens if someone is using the name line format for the widget, saves the data - thereby populating the first / last names, and then attempts an update? Would it not cause the name line to be set to whatever the previous values of first / last name are? Or does this data here only include the data that specifically came from the widget?
Comment #15
malovanets commentedOh... really...
It has to look like this. Thank's.
It receives the data from widget before saving to the database and updates all the 3 fields (first_name, last_name, name_line) all the time, when the data is changed.
Comment #16
malovanets commentedComment #17
dwkitchen commentedIt is possible, although why someone would, to have both first/last name and name line enable so perhaps it should be
Comment #18
malovanets commentedThank's David
Comment #19
joshmillerComment #20
rszrama commentedI simplified the logic of the split from the full name to first / last name. We can manipulate array values by reference via foreach and play with the PHP array API a little to make it easier to extract that first name. Have a look! : )
Commit: http://drupalcode.org/project/addressfield.git/commitdiff/4e31534