Passer la navigation

[Résolu] Checkbox html shows in post form

This support ticket is created Il y a 2 years, 10 months. 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Fuseau horaire du supporter : Asia/Kolkata (GMT+05:30)

Ce sujet contient 3 réponses, a 2 voix.

Dernière mise à jour par Minesh Il y a 2 years, 10 months.

Assisté par: Minesh.

Auteur
Publications
#2628885
Screenshot 2023-07-31 155837.png

I have some custom fields setup as check boxes. Depending on what the user selects it will store different html

My issue is that when the html html stored seems to cause the checkboxes html code to show in plain text on the form itself.
I had removed the html from the Studio option as an example

#2628935

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Can you please tell me why you would like to store HTML as checkbox value? Where normally you should use either number or text for your checkbox value or combination of number and text as checkbox value.

#2629045

we are using it to display icons based on the checkbox that is ticked

#2629053

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Well - I suggest you can configure your checkbox field value either numeric or text and then you can display the icon where you want to display the checkbox value.

Please check the following related ticket that might help you:
- https://toolset.com/forums/topic/displaying-html-conditionally-based-upon-custom-checkbox-field/#post-420675