Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Submit button keeps disabled #586

Open
kartsan opened this issue Mar 1, 2025 · 2 comments
Open

Submit button keeps disabled #586

kartsan opened this issue Mar 1, 2025 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@kartsan
Copy link

kartsan commented Mar 1, 2025

Hello,

I have a question about Submit button and specifically its enabled/disabled state. I made a form with one String input and three Select with custom options entry types. The form should behave like this: If all of these entries are set with values, Submit button should be enabled.

All these entries have a custom variable set in the dashboard and in Form Events, code here:

if (context.element.id === "input1") {
  context.grafana.locationService.partial({
    "var-Input1": context.element.value
  }, true);
  console.log(context.element.value);
} else if (context.element.id === "select1") {
  context.grafana.locationService.partial({
    "var-Select1": context.element.value
  }, true);
  console.log(context.element.value);
} else if (context.element.id === "select2") {
  context.grafana.locationService.partial({
    "var-Select2": context.element.value
  }, true);
  console.log(context.element.value);
} else if (context.element.id === "select3") {
  context.grafana.locationService.partial({
    "var-Select3": context.element.value
  }, true);
  console.log(context.element.value);
}


What happens is: I have Highlight Changes enabled. If I change a value, I can see that highlight just flashes but Submit button keeps disabled.

If I remove the code above, a changed entry keeps highlighted and Submit button is enabled.

I am a bit stuck now. I tried to add context.panel.enableSubmit() to Form Events but it didn't help.

@kartsan
Copy link
Author

kartsan commented Mar 2, 2025

Business Forms version is 5.1.0. I noticed that it works once after the Dashboard is loaded but when I try it again, I get behaviour like reported above.

@mikhail-vl mikhail-vl self-assigned this Mar 3, 2025
@mikhail-vl mikhail-vl added the question Further information is requested label Mar 3, 2025
@mikhail-vl
Copy link
Member

@kartsan Thank you for opening the issue.

We will review and get back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
Status: No status
Development

No branches or pull requests

2 participants