Skip Navigation

[Resolved] display single checkbox for 3-option field in search form

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.

This topic contains 9 replies, has 2 voices.

Last updated by Clay 3 years, 7 months ago.

Assigned support staff: Minesh.

Author
Posts
#593749
Screen Shot 2017-11-27 at 10.53.37 PM.png

Tell us what you are trying to do?
I have a field that has 3 options (sold, consigned, available). On my search form I want to display a single checkbox, with the text "only show available works".

Is there any documentation that you are following?
No

Is there a similar example that we can see?
The display would be similar to your support search box, where it says "search only in resolved threads" with a checkbox

What is the link to your site?
hidden link

#593788

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

As I understand you want to show only once checkbox "available" and you want to hide/remove other checkboxes option and with "available" checkbox option you would like to change the checkbox option text to "only show available works" - is that correct?

#594040

Yes, that's right.

#594323

Minesh
Supporter

Languages: English (English )

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

Well - You can use custom jQuery code to achieve this.

But still I want to double check that you want only "available" checkbox option not one checkbox option that search on all 3 options - could you please confirm.

Also, could you please confirm problem URL?

#594393

Yes, the view initially loads all posts (sold, consigned, and available), but the checkbox is for displaying only "available" posts.

The URL is hidden link

#594425

Minesh
Supporter

Languages: English (English )

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

so - you just want to display available posts when view loads first time (if so, no need to display checkbox - correct?) Or you want view load all results first and then when you click on "available" checkbox it should display only available posts.

Could you please confirm.

#594447
what-i-have.jpg
what-i-want.jpg

The second one. Please see the screenshots. The page is already the way I want it, except that instead of [what-i-have.jpg], I want it to be like [what-i-want.jpg].

#594459

Minesh
Supporter

Languages: English (English )

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

Ok - great. All clear now.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

#594480

Minesh
Supporter

Languages: English (English )

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

I've added the word status filter as given under using manual options when we add the filter using "New filter" button and I can see not its working fine.:

<div class="form-group">
	[wpv-control-postmeta field="wpcf-work-status" type="checkboxes" source="custom" url_param="wpv-wpcf-work-status" values="available" display_values="only show available works"]
</div>

Could you please confirm.

#594568

Yes, it works perfectly now. Thank you!