This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Can you please tell me if me if I have properly created a template, post form, and a custom fields form so they properly feed into each other.
Hi, it's a bit difficult to see all the details in screenshots. One thing I noticed is that you have 4 "address"-type custom fields, one for each component of the address (Street, City, State, Zip). Address fields in Toolset are designed to store complete, geocoded addresses, not individual components of such an address. If you need individual components of the address stored separately, those should ideally be stored in other types of fields. Another ticket here in the forum discusses an approach to split those components out of an address field automatically using some custom code:
I can take a closer look if you provide login credentials in the private reply fields here. Please let me know where to find the Form on the front-end of the site (a URL for the page containing the Form will be helpful). Let me know if it's okay for me to submit the Form to create a test post.
Hello Christian, thanks for responding to my issue. At this time Jamal with Toolset support is helping me with another issue that will overlap with this. I have supplied him with the login credentials. Let me see what happens and I will get back with you.
Thanks again Chuck
Of course, I will stand by for your update. Thanks for letting me know.
Hello Christian, I finally resolved my problem with getting my form to properly populate a new post. (example hidden link) Now its time for me to address the use of the proper fields in the form for website visitors searching. Form hidden link I will have about 25 more groups / post types that will be using a form similar to this one - such as electricians, plumbers, real estate agents. I was really surprised when you said "One thing I noticed is that you have 4 "address"-type custom fields, one for each component of the address (Street, City, State, Zip). Address fields in Toolset are designed to store complete, geocoded addresses, not individual components of such an address". The map is nice feature, but what is more important to me is that when people search by state, city, and zip code for a particular "group" / post type they come up in the search. Just FYI -I am not educated in writing code. Your help and guidance is greatly appreciated.
I would like to share my credentials with you privately.
You can share login credentials in the private reply fields here, and I'll take a closer look in wp-admin.
If you want to allow Users to search by zip, state, and city as individual search criteria (not a combined address), then those fields should not be "Address" field types. They should be other field types, like a simple text field for city, maybe a select field for state since the options would be predefined, and either a number or simple text field for zip depending on whether you want to allow zip+4 or the 5-digit basic zip code.
Those individual component fields would then be searchable in a custom search View. The problem with the individual address component field approach is those field values will not be useful with many Toolset Map features. Map View features like distance-based filtering, distance sorting, map marker placement require the use of a single address field, and work best with complete addresses, not geopolitical or regional boundary information.
If you're not comfortable writing code as shown in the example I provided, I can think of the following ways you could go about implementing individual address component search filters and also enabling Toolset Maps features that requi,re complete address fields:
- Require the entry of the complete address in an address field, and also require the entry of each of the individual address components, maintained in separate fields. Some duplication of data is necessary here, but the features of Map Views and custom search will function as expected in this scenario without requiring additional significant custom code.
I am not clear what your mean by: "maybe a select field for state since the options would be predefined" a select field?
Yes, a select field. It is a type of custom field, like "address" or "WYSIWYG" or "checkboxes". You've most likely seen a select field in a form on some other website. You click it and a list of options are displayed in rows. Your visitors click and select one of the options from the list. The available options must be predefined in wp-admin.