I have two custom pre-built lists.
One is a listing of states which when used comes in as
Arizona|Arizona
etc...

The other list is of locations which when used comes in as
0|AK - Elmendorf AFB (1234 FIGHTER DRIVE)
1|AK - Fort Richardson (5678 "X" STREET)
etc.....

I have tried manually formatting the listing in key|value pairs with custom keys but it just comes in as
0|AKElmendorfAFB1234FIGHTERDRIVE|AK - Elmendorf AFB (1234 FIGHTER DRIVE)
1|AKFortRichardson5678XSTREET|AK - Fort Richardson (5678 "X" STREET)

How do I control the 'value' to be the same string value as the 'display' (like on my states list) as this list is dynamic and has 100s of entries? A value of '0' is meaningless as there is no fixed reference.

Thanks for any assistance.

Comments

ksavoie’s picture

Issue summary: View changes
ksavoie’s picture

[SOLUTION]
Found the solution after finding this post
https://groups.drupal.org/node/71588

The arrays element name becomes the 'key'
i.e. $myarray[$someUniqueKey] = $myValue;

quicksketch’s picture

Status: Active » Closed (fixed)

Thanks for the followup @ksavoie.