Skip Navigation

[Resolved] not saving checkboxes with href link

This thread is resolved. Here is a description of the problem and solution.

Problem:
Using HTML codes in the custom checkboxes field value
Example of such checkbox:
Title: Library
Value to store: Library *
(i choose 'display the value of this field from the database') (Ffxt1HFfWKrCkbNb being the shortcode of the specific popup)
when editing the profile backend, checking some checkboxes, those with that href code are being saved as checked and appear on frontend, but after saving/loading the profile in backend, those checkboxes turn to be 'unchecked'. So, the next time i'll save that profile, those previously checked boxes will become unchecked and that content won't be seen in frontend any longer.
In other words: it doesn't stay checked after saving. The boxes without that code are fine.

Solution:
It is not recommended to use HTML codes in the "Value to store" of custom checkboxes field, I suggest you store only the simple value in the field "Value to store", enable option "Show one of these two values", move those HTML link codes into the field "Selected", see screenshot: checkboxes-link.JPG
https://d7j863fr5jhrr.cloudfront.net/wp-content/uploads/2017/08/560188-checkboxes_link.JPG
Relevant Documentation:

This support ticket is created 7 years, 3 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.

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

Last updated by Luo Yang 7 years, 3 months ago.

Assisted by: Luo Yang.

Author
Posts
#560101

HI Minesh,
continueing on https://toolset.com/forums/topic/custom-type-field-entries-wont-save-any-more
--> since i use the new admin user account, those non-saving troubles are gone, but i never found the reason for that first admin account to fail.

Nevertheless, he's an old problem with this same site (all logins you received in that topic are still valid) when creating some checkbox-type post fields. Concretely it's the field group "Field Group 8 for Profiles - Services".

There's a list of checkboxes (all options of the same entry) and some of those checkboxes i gave a href code, so that when clicked in frontend, an informative popup appears. This works very well (the popup), apart from these issues:

1- when editing the profile backend, checking some checkboxes, those with that href code are being saved as checked and appear on frontend, but after saving/loading the profile in backend, those checkboxes turn to be 'unchecked'. So, the next time i'll save that profile, those previously checked boxes will become unchecked and that content won't be seen in frontend any longer.
In other words: it doesn't stay checked after saving. The boxes without that code are fine.

Example of such checkbox:
Title: Library
Value to store: Library *
(i choose 'display the value of this field from the database') (Ffxt1HFfWKrCkbNb being the shortcode of the specific popup)

issue 2: in the profile editing, the choice option for such checkbox has automatically following strange name:
*" class="wpt-form-checkbox form-checkbox checkbox checkbox" checked="checked" /> Library

Of course, this isn't very sexy for customers editing their profile later via Cred 😉 This should normally read:
Library
Or eventually: Library *

How could i solve this, please?
Thanks a lot in advance!
ps if you require concrete links than please provide a private reply.

#560188
checkboxes-link.JPG

Dear filip,

Minesh isn't available currently.

In your case, it is not recommended to use HTML codes in the "Value to store" of custom checkboxes field, I suggest you store only the simple value in the field "Value to store", enable option "Show one of these two values", move those HTML link codes into the field "Selected", see screenshot: checkboxes-link.JPG

#560419

Great Luo! That totally fixed it.
It might seem a little silly when the solution was in front of me, but sometimes it's not so evidently without real examples (many options possible if you dont know the correct setting).
Best regards

#560619

You are welcome