I'm utilizing the checkbox custom field to store a value that contains a link. On the front-end, I want the stored value name to act as a link to a specific URL, however the HTML is not saving/storing in the custom field.
So, I did as instructed and placed the HTML in the "Selected" field, however the HTML is being stripped out when I save the field. No matter what I do, I cannot get the HTML to save in the checkbox settings. How can I work around this?
Hello. Thank you for contacting the Toolset support.
I'm not sure why you want to add the HTML anchor tag within the selected value option.
You can display the checkboxes options on frontend based on checked and unchecked values.
For example:
[types field='field-slug' option='0' state='checked']
add value to display when checkbox 0 option is checked
[/types]
[types field='field-slug' option='0' state='unchecked']
add value to display when checkbox 0 option is unchecked
[/types]
[types field='field-slug' option='1' state='checked' ]
add value to display when check box 1 option is checked
[/types]
[types field='field-slug' option='1' state='unchecked']
add value to display when checkbox 1 option is unchecked
[/types]
I'm not sure I understand your response. Perhaps I was unclear in my support request. I know how to display the checkbox options on the front end, but I want the checkbox option to display as linked text. In other words, I want the displayed value of the option to link to a specific URL.
The previous support thread that I included in my request explains how to do this...however it no longer works. The HTML I am adding to the value is getting stripped out. How can the HTML within a value be retained?
I'm trying to configure checkboxes. It's for a website featuring local land trusts. Each land trust has targeted areas of operation. These targeted areas, or Towns, can be sorted on the front end. But, each individual land trust page shows all of the areas of operation in a list (see attached screencap-3.png). I'd like for each of these areas of operation to act as a link, to a URL I specify in the custom field settings.
I can see that with the current version of Types the HTML link does not get saved with checkboxes option label or selected box.
I've reported this issue for further investigation and escalate it to our next level support.
However - I still do not think that this is a good idea to save the link to checkboxes option selected box.
If you can share details about what link you want to display with what checkbox option and send me admin access details, let me see if I can able to offer you any workaround.
Can you please share all the following required detaials:
- Where I can see the checkboxes field, whats its name
- What link you want to assign to what checkboxes option
- where you are trying to display the link of selected checkboxes, on what page/post?
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) 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 have set the next reply to private which means only you and I have access to it.
When you try to add the "Areas of Operation" field using the "Fields and Views" button (you can see "Fields and Views" button with the following edit page, You will see the option "Custom values for selected and not selected items" as you can see with the following screenshot: hidden link
=> hidden link
You should add the selected value with your desired URLs and then copy/past the generated code to your Beaver Builder text module.
I've done that for the "Andover" as you can see with your beaver builder:
=> hidden link
Can you please check also that you are able to add the html link to checkboxes field label and selected box when you edit your custom field group "Land Trust Fields".
Hi Minesh, thank you for all of your efforts. I'm good now, the suggestions you made and the filter added to the functions.php file did the trick. I can now do what I need to do.