Skip Navigation

[Resolved] best way to composit old vehicle web (vintage vehicle web)

This support ticket is created 5 years, 7 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
#1286743

Tell us what you are trying to do?
I want build web for old vehicle (vintage vehicle web). That´s mean all vehicle must be defined on start. Administrator make manufacturers and models before web start and by the run web admin can make others. For example: motocycle Triumph 5T SpeedTwin from 1938 year.
In this example:
"type" is: motorcycle
"manufacturer" is: Triumph
"model" is: 5T SpeedTwin

I would prepare data for users - users can create "vehicle", and in the vehicle form he can set only from three select components:
- select "type" (car or motorcycle)
- select "manufacturer" (Triumph, BSA, Ariel,... - dependent on first select)
- select "model" (dependent on second select)

I try all build it from custom posts. I don´t know if it is good way, because user has all items in the same time and dont oriented in items in select component. I would like hide second a third selects. Shows second select component and fill items after user choose item in the first select component.
For example - if select motorcycle, than shows second select and fill only by motorcycle items. Third select items depend on second select - if select manufacturer Triumph, than fill third select component by items for Triumph model only, for example 5T, 6T, Bonneville...
So user can create "vehicle" with defined parametrs. User can create many vehicles - fill his garage from many old veicles.

My questions:
1. Is it possible solve it by display conditions ? If yes, how ?
2. If yes, how set filters above grid for filtering in frontend ?
3. "vehicle" has empty title, because is not needed - Is possible compoud title of custom post type from parts - from values from custom fileds ? For example in or after save "vehicle". Title post type in "vehicle" will be empty and I need set it from parts - title made like this key: nickname-manufacturer-model. Because in the WordPress backend is needed oriented in the dates "vehicles" and without title is it not possible.

This my concept is for simple use for users and for filtering.

Is there any documentation that you are following?
no

What is the link to your site?
hidden link

#1286809

Hi, there's nothing exactly like this built in to Forms. Normally in Forms you can create a post and optionally select one parent post. You cannot select parent, grandparent, great-grandparent, and so on. So if you want to achieve this with post relationships Types > Manufacturers > Models it will require custom code including generic fields, the Forms API, and the Post Relationships API. If you're not familiar with PHP, I suggest reaching out to an independent professional to achieve exactly what you're looking for.

1. Is it possible solve it by display conditions ? If yes, how ?
You can use a series of generic fields and display conditional groups to show and hide inputs based on other field selections: https://toolset.com/documentation/user-guides/conditional-display-for-form-inputs/#adding-conditional-group
This can be part of a custom code solution.

2. If yes, how set filters above grid for filtering in frontend ?
If you use a series of chained one-to-many relationships like Types > Manufacturers > Models > Vehicles, you can create one post relationship filter with many generations of filters. https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/how-to-filter-posts-by-their-ancestors/

3. "vehicle" has empty title, because is not needed - Is possible compoud title of custom post type from parts - from values from custom fileds ?
This isn't built-in to Toolset but with custom code, you can create an automated post title. Several other tickets in the forum discuss how to accomplish this with the save_post API:
https://toolset.com/forums/topic/post-link-from-custom-fields/
https://toolset.com/forums/topic/create-post-title-for-cpt-from-two-custom-fields/

#1287423

The problem is not fully resolved, but I don’t need more help now