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

Default Value Display '0' Issue in Number Field in Data Manipulation Form #306

Closed utkarshsalunkhe closed 11 months ago

utkarshsalunkhe commented 11 months ago

I have identified an issue related to the default value display in the Number Field on forms within this plugin. Currently, when a Number Field is included in a form, it consistently displays a default value of 0,

Screenshot 2023-12-11 114011

how can make this number field blank by default ?

mikhail-vl commented 11 months ago

@utkarshsalunkhe Did you setup fields as Number Input? It requires a number. If nothing is specified it's 0.

You will need to use String Input to support empty default values.

utkarshsalunkhe commented 11 months ago

I have specified a particular field as a number field, but I'm encountering an issue where the field displays the default value '0' in the form. Could you please guide me on how to make this number field empty in the form by default ?

On Tue, 12 Dec 2023, 1:14 am Mikhail Volkov, @.***> wrote:

@utkarshsalunkhe https://github.com/utkarshsalunkhe Did you setup fields as Number Input? It requires a number. If nothing is specified it's 0.

You will need to use String Input to support empty default values.

— Reply to this email directly, view it on GitHub https://github.com/VolkovLabs/volkovlabs-form-panel/issues/306#issuecomment-1850769134, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3LPEKCIDAN2WPSUHFGNHDLYI5PANAVCNFSM6AAAAABAPG7MNOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJQG43DSMJTGQ . You are receiving this because you were mentioned.Message ID: @.***>

mikhail-vl commented 11 months ago

@utkarshsalunkhe Number fields always will be 0, because there is no "empty" numbers.

As I said, to allow empty values, you will need to use String input elements: https://volkovlabs.io/plugins/volkovlabs-form-panel/form-elements/#string-input