Skip Navigation

[Resolved] If Checkbox not selected value not displaying

This support ticket is created 6 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

This topic contains 28 replies, has 2 voices.

Last updated by Luo Yang 6 years, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#594789
2017-11-30_15-47-11.png
2017-11-30_15-44-56.png
2017-11-30_15-43-03.png

I am trying to: Use checkboxes with Selected and not selected values.

Link to a page where the issue can be seen: hidden link (DEV version, you need to setup custom hosts: 91.239.201.15 hidden link)

I expected to see: Expected is to see the filled value.

Instead, I got: Nothing.

And it is doing only some times. Maybe it´s causing some character or the length of filled value.

#594802

Ok I have deleted the Post wich is using the checkboxes and create again and it started working. I will try add more products and more checkboxes now.

#594856
2017-11-30_20-08-14.png

Ok, the problem is somewhere between custom post type Pricing checkbox which is connected to post type product (woocommerce) as its child.

When I create product with name "Microsoft Office 365 Business" and then Custom Pricing Post "Office 365 Business" and connect it to Parent Post it works. Something is happening when I customize URL or Name of Product I think. Because after it stop displaying the value of unchecked checkbox.

And I have second question, I created Custom Field WYSWIG for custom Category taxonomy, but I dont know where to edit it. When I click on customize category, it shows only the normal wordpress fields without the custom WYSWIG.

#594877
missing.png

I edit all products - add photo, and its broken everywhere now. Only displaying the checked value.

So what is wrong ?

#594882
resave.png

And I realized, that when I resave the child post to other parent and then save again to same parent as before, it shows the unchecked values again.

#594977

Dear Martin,

Q1) the problem is somewhere between custom post type Pricing checkbox which is connected to post type product (woocommerce) as its child.
in case there is any compatibility problem, please try this:
1) deactivate other plugins and switch to wordpress default theme, and test again
2) If the problem still persists, please provide a database dump file (ZIP file) of your website in below private detail box, I need to test and debug it in my localhost, thanks

Q2) I created Custom Field WYSWIG for custom Category taxonomy, but I dont know where to edit it. When I click on customize category, it shows only the normal wordpress fields without the custom WYSWIG.
It is abnormal, how do you setup the "custom Category taxonomy"? Are you using Types plugin or other plugin to create it?
Same as Q1), I need details to duplicate same problem, thanks

#595585
Toolset 2.png
tool1.png

Hello! Thanks for response. I have only toolset plugins active and its still same. I also tried to switch to the Twenty Sixteen theme. Still the same.

About category WYSWIG, I am using only Types plugins so I did set it up by Toolset. I cant add ZIP file. Here is the OneDrive link: hidden link

#595607

I can create Admin Account for you, if you need it 🙂

#595791

Thanks for the details, I am downloading the file, will feedback if there is anything found

#595816
term-field.JPG

Here are what I found:
There are two sets of wordpress site in the file you provided:
1) table_prefix "bst_3_", but the user tables are missing: for example:
"bst_3_users" and "bst_3_usermeta"
So it is not possible to setup the website with "bst_3_" tables

2) table_prefix "bst_", I can import the database into my localhost, I tried these:
a) activate plugin Woocommerce + Views + Types + Layouts + Woocommece plugins
Your screenshot hidden link
b) Dashboard-> Toolset-> Post fields
I can find the custom field "Google G Suite services" in field group "Pricing table - Google G Suite"
Your screenshot: hidden link
c) Where can I see the problem as you mentioned in the screenshot:
hidden link
How do you output the custom checkbox field value in front-end?
Please point out the problem page URL, if it needs other custom plugin/theme please provide detail steps to duplicate the same problem

For the Q2) I tried it in your database dump file, it works fine, see screenshot: term-field.JPG, you will need to setup the custom term field here:
Dashboard-> Toolset-> Term fields
see our document:
https://toolset.com/documentation/user-guides/term-fields/

#595900

Hello, thank you for your help,

yes, exactly - For every product category Google G Suite services, Microsoft Office 365 etc. is custom field group Google G pricing, Office 365 Pricing etc. and it is the problematic ones.

As output I use the View in View. The First view is called Produkt - pricing with Content of custom post type "Obsažené služby" (included services) and Query filter: Post relationship filter
Select posts that are children of the Post where this View is shown.

And in loop is:

[types field='google-g-suite-services' separator='<br>'][/types][types field='office-365-e-services' separator='<br>'][/types][types field='office-365-services' separator='<br>']...........[/types]

........... = there will be added other products soon.

And this view is included in view (Podkategorie verze produktů) and Layout (Template for Produkty).

Thank you for Ad2) I am going to try, and I think it will work. It was my mistake to use post field here instead of term field. Sry.

#596154
Microsoft-Office-365-Busines.JPG

I need the detail steps to see exact problem you mentioned in the screenshot:
hidden link

I tried these:
put the view "Podkategorie verze produktů" into a wordpress page, it display No items found
So I tried these:
1) edit the view "Podkategorie verze produktů", remove the filters in it. (you can skip this step)
2) Edit the view "Produkt - pricing", you are using wrong filter in it, since it is views in view, the filter should be:
Select posts that are a children of the current post in the loop.

And test the wordpress page again, I can see there seven items in the product "Microsoft Office 365 Business", which are different from your screenshot, see my screenshot Microsoft-Office-365-Busines.JPG

And here is the document about "Querying and Displaying Child Posts":
https://toolset.com/documentation/user-guides/querying-and-displaying-child-posts/

For your reference.

#596444

Ok, I edit the view to right filter: Select posts that are a children of the current post in the loop.

But it doesn´t help. Nothing changed :-D.

Detailed steps are:

1) create Product, name it "Google G Suite Business... etc."
1.0) create post in woocommerce post type product
1.1) select its category from custom taxonomy "Kategorie produktu CS"

It will have category and subcategory. "Kompletní firemní sady" > "Google G Suite".

1.2) select its brand from custom taxonomy "Značka produktu"

2) create Licensing options for the brand and name it "Google... etc."
2.0) create post in custom post type "Licenční podmínky" and select the same Brand as product from custom taxonomy "Značka produktu"

3) Create pricing table options for product
3.0) Create custom post field group for product and name it "Pricing table - Google G Suite"
3.1) Select Use Field Group when ALL conditions are met and:
This Post Field Group is used with:
Post Type(s): Obsažené služby
Term(s): Google G Suite
3.2) + Add New Field Checkboxes and setup field name "Google G Suite services"
3.3) Save option When unchecked, save 0 to the database
3.4) Add the pricing table options as checkboxes. For example:
Title: E-mail s 30 GB poštovní schránkou
Value to store: 1 (i dont change it anywhere)
Show one of these two values:
Not selected:
<li class="not-included">E-mail s 30 GB poštovní schránkou
Selected:
<li class="included">E-mail s 30 GB poštovní schránkou

and more of them. All have value to store 1.

CSS is:

li.included {
color: #0188cd;
list-style: none;
}
li.included:before {
content: "✅ ";
}
li.not-included {
color: #ccc;
list-style: none;
}
li.not-included:before {
content: "❌ "

4) Create connection between those pricing options and products
4.1) create post in custom post type "Obsažené služby"
4.2) select its subcategory "Google G Suite" from custom taxonomy "Kategorie produktu CS"
4.3) Save
4.4) Check the included services in shown checkboxes from "Pricing table - Google G Suite" post field group
4.4) Select the product from post relationship

"This Obsažená služba belongs to Produkt Google G Suite Business"

4.5) Save

And then create Second product with same categories, use same filed group and create it in "Obsažené služby" and select it checkboxes.

After that, everything works perfectly.

Then when I add product photo or change something in product, the Not selected checkboxes value are not displaying.

After that, when I go back to "Obsažená služba" post and change the post relationship to other product, save and then set it back to product which it belongs to, it show the Not selected values again.

Do you need more details? 🙂

#596699

I do need more details, your database dump file does not show the same result as your screenshot, and your website settings is very complicated, please provide a test site with the same problem (without other plugins and with only default theme), also point out the problem page URL, and where should I check, which items should be outputed, I need a live website to test and debug, thanks

#597013

I tried the credentials you provided above, it redirect me to another URL:
hidden link
I see below error:
404 Not Found

And I tried this URL: hidden link
This page isn’t working
hidden link****.cz redirected you too many times.

So it is not possible to debug the problem in your test site.
Please check it, make sure the website can display same problem as you mentioned above:
https://toolset.com/forums/topic/if-checkbox-not-selected-value-not-displaying/#post-594789

If you can not duplicate website, please provide a copy of your website by following our document:
https://toolset.com/faq/provide-supporters-copy-site/