Skip Navigation

[Resolved] i am trying to generate a custom source for a numeric drop down

This support ticket is created 5 years 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 7 replies, has 2 voices.

Last updated by Minesh 5 years ago.

Assisted by: Minesh.

Author
Posts
#1637607

Tell us what you are trying to do?
I am creating a custom search for property listing page. I have created the search bar which has three fields. Price, No. of bedrooms and property type. under the drop down list, i would like the information to be static, rather than populated from the posts on the page, which will change. once i entered the manual drop down list, the values which I have inserted only seem to appear if there is a present post with that corresponding price.

Is there any documentation that you are following?
I have been following your youtube tutorial, which was great, however I am trying make it more user friendly with these tweeks.

Is there a similar example that we can see?
hidden link
Please see the drop down list for price and bedrooms, i am not doing a minimum and maximum, instead just a simple select option

What is the link to your site?

The site is not currently posted as the listings are a test and cannot be loaded online. please find below the code toolset has inserted. In case you can see a simple error.

[wpv-filter-start hide="false"]
[wpv-filter-controls]
<div class="row">
<div class="col-md-3"><div class="form-group">
<label class="label" for="wpv-price">[wpml-string context="wpv-views"]Price[/wpml-string]</label>
[wpv-control-postmeta field="price" type="select" source="custom" default_label="Please Select" url_param="wpv-price" values="300,400,500,600,700,800,900,1000,1100,1200,1300,1400,1500,1750,2000,2250,2500,2750,3000,3500,4000,4500,5000" display_values="£300 PCM,£400 PCM,£500 PCM,£600 PCM,£700 PCM,£800 PCM,£900 PCM,£1000 PCM,£1100 PCM,£1200 PCM,£1300 PCM,£1400 PCM,£1500 PCM,£1750 PCM,£2000 PCM,£2250 PCM,£2500 PCM,£2750 PCM,£3000 PCM,£3500 PCM,£4000 PCM,£4500 PCM,£5000 PCM," class="input-style"]
</div></div>
<div class="col-md-3"><div class="form-group">
<label class="label" for="wpv-number_of_bedrooms">[wpml-string context="wpv-views"]Number of Bedrooms[/wpml-string]</label>
[wpv-control-postmeta field="number_of_bedrooms" type="select" source="custom" default_label="Please Select" url_param="wpv-number_of_bedrooms" values="0,1,2,3,4,5,6" display_values="Studio,1 Bed,2 Beds,3 Beds,4 Beds,5 Beds,6 Beds" class="input-style"]
</div></div>
<div class="col-md-3"><div class="form-group">
<label class="label" for="wpv-property_type">[wpml-string context="wpv-views"]Property Type[/wpml-string]</label>
[wpv-control-postmeta field="property_type" type="select" default_label="Please Select" url_param="wpv-property_type" class="input-style"]
</div></div>
<div class="col-md-3">[wpv-filter-reset reset_label="Reset Search" output="bootstrap" class="reset-button"]</div>
</div>[/wpv-filter-controls]
[wpv-filter-end]

#1638115

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I checked the link you shared:
=> hidden link
---
I can see that the price and No. of bedrooms filters are configured with the minimum and maximum but you want to have single dropdown for that - correct? If yes: your issue is you want to display all the values by default with your dropdown - correct?

Please correct me If I am wrong.

#1643191
toolset quary.png

Hi Minesh,

Sorry for the delayed response. a maximum and minimum function would be excellent.

If this is not possible, I would like to have pre-populated fields rather than pull the information from the posts.

If you look again at the section for maximum and minimum on the link below you can see that there are prices already input into the drop down list. These stay the same regardless of the posts on the page.

hidden link

Please see attached a picture of my drop down list, which should help you depict the problem.

#1643293

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

What if you Edit your view and go to the section "Search and pagination"
- select the option "Let me choose individual settings manually"
In the section "Which options to display in the form inputs" :
- Please select the option "Always show all values for inputs"

Does that help?

#1643507

I believe I already selected this option. How do I go back to Edit that section? or do I have to start again?

#1643599
toolset.png

when entering the values I don't appear to have an option
In the section "Which options to display in the form inputs" :
- Please select the option "Always show all values for inputs"

please find attached image. I have also checked in the style options and filter options

#1643773

I believe i have just figured it out.

#1643807

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok - Can you please share your findings and let me know if you need further assistance.