Visibility Condition
The Visibility Condition is a JavaScript expression that controls whether an input field is shown or hidden in the plugin's UI. It runs dynamically based on the current values of other fields.
Where does it live?
Each input field in the Developer Hub Input Builder can have a visibilityCondition attached to it. It appears as a collapsible code editor under the field's configuration.
How does it work?
The condition is evaluated as a JavaScript expression that must return a boolean:
true→ field is visiblefalse→ field is hidden
It has access to a context object containing the current values of all other fields via context.inputData:
context.inputData.fieldKey // value of another field
How to write one
Basic example — show field only when another field equals a specific value:
context.inputData.auth_type === 'oauth'Multiple conditions:
jscontext.inputData.auth_type === 'oauth' && context.inputData.client_id !== ''Always visible (default):
jstrueAlways hidden:
jsfalseBased on a field having any value:
js!!context.inputData.some_fieldKey rules
Must be a single expression that evaluates to a boolean (no
returnkeyword needed)References other fields via
context.inputData.<fieldKey>wherefieldKeyis the field's unique keyIf the condition throws an error, the field defaults to visible
If no condition is set, the field is always visible
Testing it
Use the Test button in the visibility condition editor — it evaluates the condition against the current field values and shows the result (true/false) in the response panel below.