Decimal

how to insert numbers with commas in database connected form??

can you give an example, that’s a bit vague

i need to insert in those fields decimal values and when click save it doesn’t save on my database

A few of things you could try.

The red edges suggest a validation problem

Firstly I assume you have the input type set to number?

If so, try setting a validation rule to say the field is #Number

Also, if you have any server action validation, try removing it temporarily to see if this helps

To test your serve action, set the fields to TEXT

The server action will deal with the type translation if globals are set correctly, this will allow you to exclude the possibility of a server action issue

What is the field type in your database?
Also what’s the error returned when you try to submit your form, and have you applied any validation rules to your form inputs:

decimal

that’s the error returned

{"code":"HY000","file":"\/membri\/vmpl1\/dmxConnectLib\/lib\/db\/Connection.php","line":108,"message":"SQLSTATE[HY000]: General error: 1366 Incorrect decimal value: '' for column 'Larghezza_tot' at row 1","trace":"#0 \/membri\/vmpl1\/dmxConnectLib\/lib\/db\/Connection.php(108): PDOStatement->execute()\n#1 \/membri\/vmpl1\/dmxConnectLib\/modules\/dbupdater.php(38): lib\\db\\Connection->execute('INSERT INTO `Tr...', Array, false, 'Tranceria_ACC')\n#2 \/membri\/vmpl1\/dmxConnectLib\/lib\/App.php(159): modules\\dbupdater->insert(Object(stdClass), 'insert1')\n#3 \/membri\/vmpl1\/dmxConnectLib\/lib\/App.php(128): lib\\App->execSteps(Object(stdClass))\n#4 \/membri\/vmpl1\/dmxConnectLib\/lib\/App.php(98): lib\\App->execSteps(Array)\n#5 \/membri\/vmpl1\/dmxConnectLib\/lib\/App.php(71): lib\\App->exec(Object(stdClass))\n#6 \/membri\/vmpl1\/dmxConnect\/api\/New Folder\/New File.php(379): lib\\App->define('{\\n  \"meta\": {\\n ...')\n#7 {main}"}

i have applied no validation value, i can insert records in the db if i only submit integer values.
tried applying validation values same result

So what is the value you are trying to insert into Larghezza_tot field it seems to me you are sending an empty string?

tried with comma and dot

ah, on my db i also had the fields tolleranza with a default value and i thought i could see them in the bootstrap form

Anything I can do?

The error message says that you are trying to send an empty string for the Larghezza_tot field. Are you sure your first form input is the one selected in the insert record step as a value for the Larghezza_tot field? It doesn’t seem so.

in the console i have a http500 error server saying: server detected an unexpected error which forbids the esecution of the request
(XHR)POST - ‘mysite’/dmxConnect/api/admin/insert.php

It’s explained how to see the exact error message here:

1 Like

the same error i had the last time

So, once again:

thank very much teodor