Skip Navigation

[Resolved] Connect user submission to view

This support ticket is created 4 years, 11 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 11 replies, has 2 voices.

Last updated by Shane 4 years, 11 months ago.

Assisted by: Shane.

Author
Posts
#1559207

I have been trying since yesterday (thank you quarantine) to use this plugin but there's something I don't get, even after watching several times the video tutorials. The site I'm using it on is consegneacasa.org

Maybe you can help me understand what I am doing wrong.

My goal: creating a site that
- allows users to post shops of different types (butchery/bakery/restaurant and so on) in different cities - allows users to filter the list of shops by location and type. The filter should include three selectable dropdown menus, one for the region, one for the city and one for the type of shop

What I did so far. I probably did too much and I am confused no, but:

-I created a series of custom fields for the shops post type
-also created a template that should be shown somewhere on the frontend (but don't know where)
-and last but not least a form to allow users to submit new shops

What I also have is a page that shows the form and another one that shows a search box and should show a view (all in draft at the moment).

The main problem I have is connecting the user submission form output to the view, because I am unable to set some search fields that allow me to filter the shops by city and type (which are two of the custom fields I created).

I really don't know how to fix this. I tried watching the how to start videos, but found them a bit confusing.

#1560533

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

Thank you for getting in touch.

Just to ensure that I get this ticket query correctly, you have a Form on the same page as a view.

However you want to transfer the user's inputs on the form to the View ?

If so then this wouldn't be possible unless you use some form of jQuery to copy the inputs from the form to the search.

Thanks,
Shane

#1560537

Hi Shane, is there an alternative way to do what I want without using JQuery?

#1560583

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Alessandro,

Maybe I need some more clarity. Is it that you want the user to search for the same values that was enter?

Or is it that you want the users values to be automatically added to the view filters and not what I thought about having the values selected.

Example if your user Adds B to the form you automatically want B to be added to the list of available options.

Please let me know.
Thanks,
Shane

#1562663

Hi Shane, I think you got it right.

Basically I need two different pages that interact one with each other:
-on one page I need a form that users can fill with infos I require them (like shop location, shop type and so on)
-on another page I want a search tool that allow users to filter the whole list of shops that other users had submitted, with the possibility to choose using location, type and others

It would be great if the results of the search/filtering could be shown using both a list visualization and a map.

I don't know what's needed on the backend.

#1562769

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Alessandro,

Ok so I understand now.

Basically it all depends on what your field types are.

How would you gather the Shop Location ? Will it be a checkbox, taxonomy or a single field where the user writes in the field.

My suggestion for this would be a Taxonomy where the user can check to see if the location is there already, if its not then they can add it through the form.

The shop type can be checkbox since you will most likely have a set list of categories.

With this the options will automatically be added to the filter each time the user adds a new value.

"It would be great if the results of the search/filtering could be shown using both a list visualization and a map."

This is also possible, have a look at the documentation below.
https://toolset.com/documentation/user-guides/maps/display-on-google-maps/how-to-display-custom-search-results-on-a-map/

Please let me know if this helps.
Thanks,
Shane

#1562781

For the shop gathering I had thought of multiple dropdown menus. The cities are under provinces, which are included in regions. So I thought of creating a first dropdown menu that includes all the regions, another one that includes all the provinces and each group of provinces is selected by the region selection, and a third dropdown menu that is populated by the users selecting the choices already available or, as you say, allowing them to write down the city.

Is it possible to do so? Should I use taxonomies to obtain this kind of result?
And if so, would it be a problem if I had hundreds of taxonomies in terms of speed of the site?

For the shop type should I use a taxonomy or what else?

Thanks! It's a bit complicated to me to understand this plugin.

#1562843

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Alessandro,

For the shop gathering I had thought of multiple dropdown menus. The cities are under provinces, which are included in regions. So I thought of creating a first dropdown menu that includes all the regions, another one that includes all the provinces and each group of provinces is selected by the region selection,

This approach is actually fine since there is already a predefined list for them to pick from and you can add this list to the frontend filters.

For the shop type should I use a taxonomy or what else?

The shop type can be a custom field as well with a predefined list of options for them to pick from. We actually have some documentation on how to build your search.

If you're not familiar with this then you can go to the link below to see in more details on how to build out the search for your site.
https://toolset.com/documentation/user-guides/views/front-page-filters/
https://toolset.com/documentation/user-guides/views/front-page-filters/advanced-settings-custom-search/

Please let me know if this helps.
Thanks,
Shane

#1563615

Hi Shane, re-reading one of your previous messages you said "My suggestion for this would be a Taxonomy where the user can check to see if the location is there already, if its not then they can add it through the form."

I was looking in the taxonomies but I can't find a way to do it. Is there some option I should use?

#1564469

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Alessandro,

There will need to be a compromise here because you can't have conditionals for taxonomies in your Form.
On the form you will need to employ a similar custom code that I shared in the example link in order to hide the different other taxonomy locations.

Given that there is so many dependencies then you will need to create multiple different taxonomy lists for each State for a country.

Lets say you have a taxonomy called Country, you only want to show the list of States that are for the US State, so you will need another taxonomy called US states.

So when the user selects USA on the countries taxonomy you will unhide the US state taxonomy.

If the User selects France you will need to unhide the equivalent taxonomy for the France States.

This will need to be done use custom coding similar to what I provided in my previous post. Only Custom fields have build in conditionals for the CRED form.

A better way I can see this working is to make use of our toolset maps and distance filters. This would remove the need for you to have state and country filters.

As the user can simply filter for stores near them using the distance filter.

Take a look at the documentation below.
https://toolset.com/documentation/user-guides/maps/display-on-google-maps/filtering-and-ordering-map-markers-by-distance/

Let me know what you think of this alternative as I believe it will achieve the same results just differently.

Thanks,
Shane

#1565279

That's a pity, Shane. I see a lot of cases where having conditional taxonomies would be really useful. I suggest you to think about it in the next updates of the plugin.

I saw the last solution you propose applied on one of the sample websites (car listings, if I recall correctly) but I think it might be reeeeeally expensive, right? Because you need to use Maps APIs and you end up paying 7$/1000views... Or is there a way to avoid these costs?

#1565711

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Alessandro,

You can actually open a feature request by going to the link below and submitting the form.
https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/

Also you wouldn't need to pay for the Google Maps API as there is a free quota and our Toolset Maps plugin has built in cache that can cache the address information so that there isn't a lookup on the google API each time which reduces the number of request that is made to the API.
https://toolset.com/documentation/user-guides/data-caching-for-google-maps-addresses-2/

Please let me know if this helps
Thanks,
Shane