Issue #477πŸ’¬ AnsweredOpened November 2, 2017by HarshOB0 reactions

By default disable Traits, On previous change in traits Enable next traits.

Quick answerby artf

@HarshOB Did you check already the wiki about Traits? I explain there how to add checkbox inputs and how to react to their changes. If it's not clear can you point me out what should I add?

Read full answer below ↓

Question

Hello,

So, I want to define Two traits in the component settings. First one is CheckBox and another one is TextBox(There can be multiple). I will define First CheckBox the multiple Input fields. When a CheckBox is clicked/checked on the base Next TextBoxes/input fields (That will be disabled by default) will be Enable. How can I achieve something like this?

Thank You.

Answers (3)

artfβ€’ November 6, 2017

@HarshOB Did you check already the wiki about Traits? I explain there how to add checkbox inputs and how to react to their changes. If it's not clear can you point me out what should I add?

HarshOBβ€’ November 9, 2017

Here I explain again with a screenshot. You can see that there are two text fields under one checkbox. So, when I clicked on checkbox/ check that checkbox then that two input fields will be enabled(I want it to disable when it loads for the first time).

artfβ€’ November 9, 2017

No, it's not something you can do with a built-in trait, but you can define your own type (which can even include all your inputs) by extending the default one

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins β†’
Premium option

Premium plugins ship with support, regular updates, and production-ready features β€” save days of integration work.

Browse premium plugins β†’

Related tutorials

In-depth guides on the same topic.

All tutorials β†’

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.