I am building a directory of items with addresses. What is the best practice to setup the mailing and physical address fields/field sets?
I will be needing the visitors to be able to enter their own listings with these addresses and edit them later. So also, is it best to create CRED forms first - and then populate a post with these fields? Or should I create the CPT first, then the CRED form that populates the custom fields? Or... ?
One of the addresses from these posts/CRED forms will end up on a map as a location.
Thanks.
An Address Field of Types, if Toolset Maps is active on the site, always, and only, has two possible formats.
The first, and desired one usually, is the Full Address as autosuggestion in the Address Field when you edit a Post.
The second are latitude and longitude, in case the Address is not found by Google, you can drag and drop the marker.
This also works just fine in CRED Forms.
It will also allow you list or display those Posts in a View, and on a Map, inclusive a Custom Search.
Any other Field will NOT be recognised as an address Field, and then you would need Custom Approaches to display them on a Map.
The only field intended for the purpose is the Address Field, available in Toolset > Post Fields when you activate Toolset Maps.
It's always better to first create the Content-Type, then the Content Edit and Creation forms, and then the data itself (populate only once everything is ready and tested with a few dummy entries)
This is because you might find during development that your data Structure is not suitable.
If you did already create all data by then, it would be a pain to change the structure.
If only a few dummy posts exist, it's no problem to modify the structure.
Please let me know in case some doubts are not fully cleared.
Hello again Beda,
So if I understand you correctly, the best practice here is to create the CRED forms and test them to be sure that the structure is the way I want it to be. Then create the CPT that stores the data from the forms. Is that accurate?
Just wanted to be sure I clearly understood you.
Thanks again for the fast response!
Take care,
You cannot create a CRED Form if the Post Type does not yet exist.
You need to tell CRED what to create or edit.
Therefore, as above explained, first you create the Content Types.
(Post Types, Fields, and so on)
Then you create the Forms.
Then you test the whole thing, with a few dummy posts.
After, you can create your actual content.
Please let me know in case there are any doubts left!
Hello Beda,
Ah, ok. It's the other way around. Ok, that's what I thought. So I'm glad I confirmed with you.
I will do that, and I will reach out if I have trouble.
Thanks again!
I have another question about this.
The address field (after activating Maps plugin) does "suggest" addresses. However, it does not contain the zip code, apparently. Since we want to be able to mail something to our users - do we need to ask for the zip code in a separate field?
Thanks