Hi!
From LFForm and using a javascript, is it possible to populate a database?
And if yes, how?
Thanks in advance.
Regards
Hi!
From LFForm and using a javascript, is it possible to populate a database?
And if yes, how?
Thanks in advance.
Regards
What are you trying to accomplish? It is not possible to insert data into a SQL database with just Javascript and nothing else. Basically, it comes down to client-side vs server-side issue; JavaScript runs on the client, so on its own it has no way to interact directly with the data on your server (for good reason).
If you absolutely need to update/insert data from a form without it being submitted, you could configure a stored procedure that validates/sanitizes the values and performs the update; I've seen people do this to increment counters and I've used it myself to make minor updates, but you want to be extra careful to ensure you're not overexposing your database.
Hi Jason.
It's logical.
The difficulty is about the search tool and the update tool.
Let me explain. I need to create 1 Search's Form with 5 fields.
My search logical is focus on only 1 field (Field 1 OR Field 2 OR Field 3 OR Field 4 OR Field 5).
I should can not search using all the fields.
When the Form find something, it should populate the other fields.
Here, I used the Field 1 to search. If my Form return 1 or more results, then the form populated the fields 2,3,4 and 5 with the first result.
Here, I used the Field 4 to search. If my Form return 1 or more results, then the form populated the fields 1,2,3 and 5 with the first result.
After return, my Form should be a Update Form and no more a Search Form.
In the opposite, of it return no result, the form need to be able to add this new recording in the database then we back to the Update Form.
That's why I thought I'd add the new record in JavaScript. But it looks like my way is not pretty good.
Thank you anyway.
Regards