Skip Navigation

[Resolved] Checkbox values not saved correctly

This support ticket is created 7 years, 8 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 – 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)

Author
Posts
#423291
checkbox2.png
checkbox1.png

Versions:
Toolset Types 2.1
Toolset Views 2.1
Toolset Maps 1.1.1
Toolset Layouts 1.7
Toolset CRED 1.7.1
Toolset Access 2.1

This is possibly related to my post here: https://toolset.com/forums/topic/cred-checkboxes-are-checked-by-default/

On a client's site I have a custom post type that's used to take requests from website visitors. I have a custom checkbox field associated with my requests custom post type to control the visibility of the post so completed (checked) do not display and not completed (not checked) are displayed.

When a website visitor uses the CRED form to create a post, I do not display the checkbox field that controls the display of the post, because I only want those of higher access to control post visibility.

It looks to me that because I'm not displaying the checkbox field on the form, it's set to something that is neither checked or unchecked, since any logic to display or not display posts based on that checkbox fail.

I created a test on one of my testings sites with a custom post type and a single checkbox.
I uploaded two screenshots that show the settings for my custom checkbox field, and the results of two posts that were created.
The first post was created with the checkbox field displayed on the CRED form and the second post did not have the the checkbox field displayed.

The first post shows the checkbox has been set to "1" because of the bug that defaults all checkboxes to checked.

The second post shows neither "0" or "1".

It's been over a month and a half since I reported this first issue.

#423314

Shane
Supporter

Languages: English (English )

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

Hi Darryl,

I believe this is also related as well, but there isn't anything that I can do since the fix has been made for version 1.8 of CRED.

Right now i'm not seeing a workaround for this provided so the best we can do is to wait until the developers make a release for this.

Thanks,
Shane

#423523

As this is something that is going to take time with each effected client, would it be possible to verify that it's related and/or will be fixed in the next release?

#423574

Shane
Supporter

Languages: English (English )

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

Hi Darryl,

Would it be possible for me to have admin access to the website to check ?

The private fields will be enabled for your next response.

Thanks,
Shane

#423591

Yes, but no private fields are being shown.

#423593

Shane
Supporter

Languages: English (English )

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

Hi Darryl,

My bad, the private fields have been enabled now.

Thanks,
Shane

#423898

Shane
Supporter

Languages: English (English )

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

Hi Darryl,

I can say that this doesn't work because the checkbox isn't on the form at all so the field is essentially not being populated with any value.

So in order for the field to get populated it must be on the form to be submitted.

Please let me know if this helps.

Thanks,
Shane

#423926

I understand why you say that, but I have over 400 examples of it working properly.

When I initially built the site, not having a field in a form would still save the field with the default (unchecked) value when the post was created.

This stopped working with the last update to CRED where the default value was ignored and all checkboxes were displayed as checked and saved that way unless they were manually unchecked.

This is *broken* and what I would like is to confirm that it will be fixed in the next release of CRED.

#423993

Shane
Supporter

Languages: English (English )

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

Hi Daryl,

Doing my investigation I believe that the issues are related and the update should resolve it as well.

Since the default is being checked when it shouldn't be.

One thing does this issue occur if the post is created through the backend and not the CRED form ?

Please let me know.
Thanks,
Shane

#424871

When creating posts from the back end

The checkbox is unchecked (as it should be). When the post is created, the correct value of the checkbox is saved.

When I check the box, the correct value is saved.

So it looks like it's just CRED.

#424921

Shane
Supporter

Languages: English (English )

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

Hi Darryl,

I believe this is CRED as well.

As mentioned earlier this issue should be fixed in our next release.

Thanks,
Shane

#431456

This issue has not been fixed as promised.

My client's site is still broken.

#431499

Shane
Supporter

Languages: English (English )

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

Hi Darryl,

What you can do as a workaround is to add the field to the form and use our Access shortcode to control the visibility of the field.
https://toolset.com/documentation/user-guides/access-control-texts-inside-page-content/
Please try this as it should serve as a suitable workaround for this issue.
Thanks,
Shane

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.