Solved

Checkbox opens text field

  • 19 July 2018
  • 3 replies
  • 1631 views

Is there a way to get a specific checkbox value to open a text box that can be used to enter an "other" value.  

 

Choice as check boxes:

Option1

Option 2

Option 3

Other

 

If user checks Option 1, Option 3, Other I want the text box to open so they can enter the other value.  

 

If I have my logic correct I when creating my list item I would map the CheckBox field and then ";" and then my TexBox field and that should give me the contolled input Option 1; Option 3;Other;[user inputed value]

 

The problem I am running into is that unless the only box checked is other I cant get the "Other" text box to show hide as needed.

icon

Best answer by Kran 30 July 2018, 09:46

Hi Emayo,

 

Use Choice Control and  in properties do following changes

1) Display Type as Check Box List

2) Allow Own Value  as checked 

 

Thanks,

Kran

Blog k2recipes 

View original

3 replies

Hey Emayo,


 


I tried some testing in my environment. I could not find a way to show/hide a text box based on the changing of an single checkbox in a "checkbox list". I was able to be successful with a single checkbox. I have uploaded a screenshot of my rules that demonstrate one way to set this up. With this design, when the Other CheckBox (CB) is changed, if the Other CB contains True (Checked), then we show the Text Box control. However, if the Other CB contains False, then we hide it.


 


I was also able to find another community post where they suggested using the "Table" control under layout to work with the "CheckBox List". You may want to try some of these steps also to see if they better fit your desired functionality.


 


http://community.k2.com/t5/K2-blackpearl/How-to-Hide-all-other-views-on-the-selection-on-one-Checkbox/m-p/103976#M34625


 


http://community.k2.com/t5/General/Checkbox-quot-changed-quot-event/m-p/79978#M2134


 


Thanks,


T


Thank you.  I have considered that as an option but I would really prefer to be able to use the Other option in a check box list.  Logicially the "contains" operator should operate differently than the "specific value" operator but it appears that they both funciton the same way which is a bit disapointing.

Hi Emayo,

 

Use Choice Control and  in properties do following changes

1) Display Type as Check Box List

2) Allow Own Value  as checked 

 

Thanks,

Kran

Blog k2recipes 

Reply