VolkovLabs / business-forms

The Business Forms panel is a conceptually new plugin for Grafana. It is the first plugin that allows inserting and updating application data, as well as modifying configuration directly from your Grafana dashboard.
https://docs.volkovlabs.io
Apache License 2.0
86 stars 10 forks source link

Disable Submit button with context.panel.disableSubmit() not working #427

Closed crl10933 closed 4 months ago

crl10933 commented 4 months ago

Hi. I have been trying to make a validation for the form where the submit button is only enabled if a certain criteria is met. I have tried to force context.panel.disableSubmit() as an always true situation but it's still enabled every time there is a change on the form.

vitPinchuk commented 4 months ago

@crl10933 Thank you for the question

A possible solution to help solve your issue

In Update Request set Enable Update to Manual image

This allows the button to be controlled via code.

In the section Element Value Changed you can add your conditional in the code image