Skip Navigation

[Closed] Have an option selected by default on a parametric search

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 9 years ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

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 3 replies, has 2 voices.

Last updated by Minesh 9 years ago.

Assisted by: Minesh.

Author
Posts
#296877

I have created this page page using parametric search. hidden link I would like to have the Property Owner (first select box) "Chatham" selected by default when the page loads. hidden link Is there a way to do that?

#297147

Minesh
Supporter

Languages: English (English )

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

Please try to follow following steps:
=> Try to edit your parametric search page
=> Go to section "Filter"
=> place your mouse cursor on your desired field
=> click on button "Edit filter"
=> A popup will open, please give your "Default value:"
=> click on button "Update input"

Does it works?

#297169

Hi, Thanks for getting back to me.

I do not see the "default value" attribute since this is a "select" type...

here is the view that I have when I click on edit field. hidden link - hidden link

#297354

Minesh
Supporter

Languages: English (English )

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

I think you should apply following code to your view's js editor:

jQuery(document).ready(function() {
  
  jQuery("select[name^='wpv-tax-book-authors'] option[value='chatham']").attr("selected","selected");

});

The topic ‘[Closed] Have an option selected by default on a parametric search’ is closed to new replies.