I have my reasons to ALWAYS hide a field in the editor UI, but I don’t see any option to do this.
Reading the docs, I came up with a “hack” to do this, which would be:
"visibility" : {
"controlling_field_path" : "whatever_other_field",
"controlling_value_regex" : "some-random-string-that-is-very-weird-86482",
"operator" : "EQUAL"
}
This will hide the field unless the value of “whatever_other_field” is “some-random-string-that-is-very-weird-86482”.
But I’m not happy with this solution.
I wonder why there isn’t a simple “hidden”: true property.
Any other approach that is not so hacky?
Hello @alvarofranz
There is no built-in way to hide a module field in HubSpot. The workaround you mentioned is the only way to do it. Or You can use a CSS selector to hide the field from the editor UI. You can use a JavaScript function to hide the field from the editor UI.
Hi @alvarofranz ,
You can set the module parameter “locked” to true to hide it from the editor.
[
{
"name": "button_text",
"label": "Button text",
"type": "text"
"locked": true
}
]
@alvarofranz
I believe you are searching for this:
“visibility”: {
“hidden_subfields”: {
“opacity”: true
}
}
{
"name" : "bt_txt_color",
"label" : "Text color",
"required" : false,
"locked" : false,
"type" : "color",
"visibility": {
"hidden_subfields": {
"opacity": true
}
},
"default" : {
"color" : "#000000",
"opacity" : 100
}
}