Good day to all! A question of the following nature: I make constructs for web forms, for php, smarti and jikveri. Everything is done using Ajax. When I click a new form element, the query goes to the database and the result is added to the window. Now when I click on an element in the window - can I edit the label, name, etc. .. Question: after all this, how do I save the finished form in the window to a file?)
2 answers
On the same jQuery.ajah, send pairs in an array [key: value, key: value, key: value], where the key is the name of the name of the form element to be transmitted. And on the server, you send data to the database or write to the file.
|
Maybe I did not understand something, maybe bydlokod (most likely), but as an option, you can put your form in some type of diva
<div id="my_form">...Ваша форма...</div>
by clicking on the "Save" button (or whatever it is) we take
$('#my_form').html();
and send to the server, where the whole thing is in the file and saved.
- Well, it’s so rough right away, bydlokod) The code is quite civil) Yes, I place the form there, in such a container, then I send the request to the server with the Ajax and write to the file. Thank you all, figured out - Barton
|