I don't think I did anything special with the address field:
- European scheme
- Removed the 2nd address line
- Translated labels etc.
If I now set a dynamic default value ([user_meta key="adres"]) (adres = translated from address, so no typo) it displays to whole address, incl zip, country, etc, in the street name field.
FF is strictly speaking doing what it's supposed to be doing, as I only set a default value for the street name. So, am I missing something, and am I using the wrong user_meta key?
That's quite likely because the address meta value in wp_usermeta is not in the format that Formidable uses. It uses a serialized string. The best way to see it is to save a value for an address field on a form and then look at the value in wp_frm_item_metas. You'll see something like this:
a:5:{s:5:"line1";s:16:"42 Alibaster Rd.";s:4:"city";s:13:"South Hildale";s:5:"state";s:11:"Mississippi";s:3:"zip";s:10:"50000-9999";s:7:"country";s:13:"United States";}
So, when you're saving the value to wp_usermeta you need to serialize the data. If the information is being saved by another plugin, you'll need to intercept it and reformat it.
Please login or Register to submit your answer
I use separate fields specifically because its my preference in how I use the data, and use either number or text fields for this information. In the advanced tab, you can set these to automatically populate with the user information stored in their browser profile, and write short codex to assure you get the right data in your forms.
Example, I use a standard text field for postal code. I set the autofill option to "postal code", and have a rule that limits it to 5 characters. ^[0-9]{5}(?:-[0-9]{4})?$
There is no need at all to use the full address field unless you want to.