Skip Navigation

[Resolved] Confirm setup of template, post form, and custom fields

This support ticket is created 2 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Author
Posts
#2118017
2116683-Template.jpeg
2116683-Post_form.jpeg
2116683-Form.jpeg

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.

#2118051

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:
https://toolset.com/forums/topic/separating-content-from-the-address-field/

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.

#2118185

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

#2118213

Of course, I will stand by for your update. Thanks for letting me know.

#2120501

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.

#2121119

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.
- Work with an independent contractor to develop and implement a custom solution that limits the amount of duplicate data that must be entered when creating these posts. This solution would automatically set the values of individual address component fields based on the address information entered in the full address field. This customization is not available in Toolset by default, but it may be possible with a bit of custom JavaScript and PHP programming as explained in the other ticket. It's rather a complex issue that needs developer attention.

#2121231

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.
https://toolset.com/documentation/customizing-sites-using-php/functions/#select

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.