Parameters - Checkbox to show/hide a text box

Hi,
I’m trying to add a parameter to a testimonial slider I’ve made so when a checkbox is ticked the testimonial (CPT) title i.e post title is hidden / displayed. I can’t seem to get the syntax correct to make a checkbox appear.

In the image where the testimonial title is I would prefer that to be a checkbox that I can wire up to sent a condition to show/hide the title.

My parameters JSOn is:

{
“setup” : {
“type” : “group”,
“label” : “Testimonial Settings”,
“params” : {
“headline” : {
“label” : “Headline”,
“type” : “text”,
“initial” : “What our Students say…”,
“placeholder” : “Enter a title”,
“description” : “Change the text at the top of the testimonial”},

  "checkbox" : {
"type"   : "group",
"label"  : "Testimonial Title",
"params" : {
    "graphicType" : {
    "type"    : "toggle",
    "label"   : "Show Title",
    "initial" : "none",
    "on"      : "icon",
    "off"     : "none"
  }}
},
  "colours" : {
    "type"     : "group",
    "label"    : "Colour Settings",
    "noPicker" : true,
    "params"   : {
      "bgColor" : {
        "label"   : "Background",
        "type"    : "color",
        "initial" : "rgb(29, 72, 104)",
        "description": "Use this to set the background colour"
      },
       "txtColor" : {
        "label"   : "Text Colour",
        "type"    : "color",
        "initial" : "rgb(255, 255, 255)",
         "description": "Use this to to set the text colour"
      },
       "progColor" : {
        "label"   : "Progress Bar Colour",
        "type"    : "color",
        "initial" : "#feb81c",
         "description": "Use this to to set the progress bar colour"
      }
      }
    }
  }
}

}

Can you please advise where I’m going wrong ?

I don’t think you are doing anything wrong here. For the “Picker” setting as you have that group, the toggle just doesn’t work. It’s a quick one, we’ll get that fixed up in the next release. Thanks for sending this parameter example our way. Have a great day!

1 Like

@Charlie thanks for the update and I’m loving trying things with the parameters as they are an awesome feature.

1 Like

Hi @Kennyboy7,

You are most welcome.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.