We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Hide one checkbox option

How Do I?

MH_Jez's avatar
MH_Jez
52 posts
one year ago
MH_Jez's avatar MH_Jez

I have a checkbox field with multiple options - Option 1 (checkbox) | Option 2 (checkbox) | Option 3 (checkbox ‘other’ - triggers a text field) | Other text (the optional text field).

One option is “other” and this is a conditional field which allows addition of an extra user-defined option (text).

On my front-end template I don’t want to show the 3rd option of “Other” in the list of selected options - instead I want the text from the conditional field to show e.g.

Option 1, Option 2, Other text

rather than

Option 1, Option, Option 3, Other text

How do I hide one option from the outputted list?

I tried using a find/replace type add-on but it seems I’m running into parse order issues and can’t get to it before it renders all options.

       
Rob Allen's avatar
Rob Allen
3,105 posts
one year ago
Rob Allen's avatar Rob Allen

Is this for a Channel form or when you output the data as part of the channel entry?

Also can you post your template snippet for the options list output, I have a feeling some clever conditionals might work here.

       
MH_Jez's avatar
MH_Jez
52 posts
one year ago
MH_Jez's avatar MH_Jez

Thanks Rob - its for the front end template display but I worked it out.

Using CE String I simply looked for the text and replaced it with nothing.

So something like

{exp:ce_str:ing replace='Other,'}{event_topic}{/exp:ce_str:ing}
? 1
       
lalisa12's avatar
lalisa12
1 posts
one year ago
lalisa12's avatar lalisa12

On my front-end template I don’t want to show the 3rd option of “Other” in the list of selected options - instead I want the text from the conditional field to show e.g. This is, in my opinion, one of the best posts that you have made. Your work is quite outstanding in both quality and quantity fnaf 2 free game. I am grateful to you for it.

       
Sarah93's avatar
Sarah93
12 posts
one year ago
Sarah93's avatar Sarah93

It’s always satisfying when you can streamline the output like that. Your approach makes it much cleaner for the users. Great work!

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.