VolkovLabs / business-forms

Insert, update application data, and modify configuration for @grafana
https://docs.volkovlabs.io
Apache License 2.0
83 stars 11 forks source link

How to pass field value as parameter to the POST URL? #141

Closed juampa2010 closed 1 year ago

juampa2010 commented 1 year ago

Hi, What am I doing wrongly?

This is the form: image

Parameter I want to add to the end of the POST url is the actual 'umbral' form value.

If I set 30 as fix value my php works fine and I get the update into MySQL database. POST is: http://xyz:7080/Arduino/MySQL/FunnyVan-DHT22_ESP8266_Lolin/update_temp.php?umbral=30

If I use something like ${umbral} it does not work, so probably I am using wrong way to reference the form 'umbral' variable. POST is: http://xyz:7080/Arduino/MySQL/FunnyVan-DHT22_ESP8266_Lolin/update_temp.php?umbral=${umbral}

Can you help me? Thanks

apellew commented 1 year ago

I have this question as well - I can't seem to find any examples which show this!

mikhail-vl commented 1 year ago

@juampa2010 Data Manipulation sends all elements in the payload. If you wish to send an element value in the URL, then use a custom request.

There is an example in the documentation: https://volkovlabs.io/plugins/volkovlabs-form-panel/request/

$var is used for dashboard variables, which can be used in the URL if defined on the dashboard. Let me know if it's clear.

mikhail-vl commented 1 year ago

@apellew There is an example in the documentation: https://volkovlabs.io/plugins/volkovlabs-form-panel/request/

Let me know if there is anything else.

juampa2010 commented 1 year ago

Yes, it worked for me, many thanks for the support.

mikhail-vl commented 1 year ago

@juampa2010 Thank you for confirming.