CMS Development

MvdLanden
Participante

Conditional options possible?

resolver

Hi everybody,

 

I was wondering if there is a possibility to have conditional options in your custom module. For example I would like to do something like:

 

{% if boolean %}
// add choicefield to my editable options
{% endif %}

Is there a way to do this?

 

Thanks. 🙂

2 Solução aceitas
anthonypizzurro
Solução
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

Conditional options possible?

resolver

When you create a custom module, you can add a boolean field: 

Add boolean fieldAdd boolean field

After you name it, you can create a HubL conditional like this: 

{% if widget.your_new_boolean %}
<!-- HTML to show when checked -->
{% endif %}

Exibir solução no post original

0 Avaliação positiva
anthonypizzurro
Solução
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

Conditional options possible?

resolver

Ah, I understand what you mean now. Currently the there is no way to conditionally hide or show additional fields in the editor. We are aware that this is an issue and we're looking into solutions for this.

 

Best,

Anthony

Exibir solução no post original

0 Avaliação positiva
3 Respostas 3
anthonypizzurro
Solução
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

Conditional options possible?

resolver

When you create a custom module, you can add a boolean field: 

Add boolean fieldAdd boolean field

After you name it, you can create a HubL conditional like this: 

{% if widget.your_new_boolean %}
<!-- HTML to show when checked -->
{% endif %}
0 Avaliação positiva
MvdLanden
Participante

Conditional options possible?

resolver

I am aware of this. However I'm not trying to show and hide the content on the front end but on the editor side. For example when I have a boolean which says "Show image" and is checked I want another option to appear in the editor which shows me the image options.

0 Avaliação positiva
anthonypizzurro
Solução
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

Conditional options possible?

resolver

Ah, I understand what you mean now. Currently the there is no way to conditionally hide or show additional fields in the editor. We are aware that this is an issue and we're looking into solutions for this.

 

Best,

Anthony

0 Avaliação positiva