Skip to main content
Kinetic Community

Remove a Checkbox Answer

Import Files
Service Item RemoveCheckboxAnswer.zip
KURL Remove Checkbox Answer.rb
How to Remove or Disable one of the Answers from your Check box list Question.

Description

There could be times when you want to either Remove or Disable one the Answers from your Check box list.


In the Service Item attached to this posting there is a Question called: Which AL Baseball teams do you want to see this year?  This Question has each of the American League Baseball teams listed.  For this example we do not want the end user to be able to see or select the Minnesota Twins.

To Remove the element take the following steps:

  1. Copy the Question Instance ID located on the Advanced Tab of your question.
  2. Open the KS_SRV_SurveyQuestion Remedy form.
  3. Paste the value copied in Step 1 into the Parent Question Instance ID and Search.
  4. Find the List element you want to remove in your Search results.
  5. Copy the value held in the instanceId field.
  6. Create an Event on your Page that has the Event of Load and the Action of Custom.
  7. The Custom Code will be: document.getElementById('SRVQSTN_INSERT instanceId VALUE COPIED IN STEP 5').parentNode.style.display = 'none';

This Service Item also has a question called Which Planet have you visited?  This question has the following List Values: Hoth, Coruscant, Naboo, and Alderaan.  For this example we want the end user to still see the value of Alderaan but we do not want them to select this planet.

To Disable the element take the following steps:

  1. Copy the Question Instance ID located on the Advanced Tab of your question.
  2. Open the KS_SRV_SurveyQuestion Remedy form.
  3. Paste the value copied in Step 1 into the Parent Question Instance ID and Search.
  4. Find the List element you want to remove in your Search results.
  5. Copy the value held in the instanceId field.
  6. Create an Event on your Page that has the Event of Load and the Action of Custom.
  7. The Custom Code will be: document.getElementById('SRVQSTN_INSERT instanceId VALUE COPIED IN STEP 5').disabled=true;

As seeing this type of functionality in action always helps I have attached a Service Item called Remove Checkox Answer to this posting. 

Can anybody guess who came up with the content for the 2nd question?