How to access fields before include?
How to access fields before include?
Hi my name is Rafael and I'd like to buy your product, but firstly I need a help. I have a system that I can control my sales. So I'd like to use the data editor in the products of my sales. But if I'm including a product, first I need the "id" of my sale to put in the products table, but I don't have this "id", because I'm including a sale. However I need to includes the product when I press the button for include the sale. I saw the dataeditor, which has a method "process()" http://prntscr.com/g9s28y which I guess, it puts the informations into the DataBase. So I'd like to press the "Create" in the dataEditor http://prntscr.com/g9s48a and don't increment values in the DataBase, just in the table of the dataEditor http://prntscr.com/g9s4gr, and when I press the button for include the sale, I take the values of my products and change the "sale_id" http://prntscr.com/g9s2jp and after that, to include the value in the DataBase.
Answers
Editor has a local table editing mode (example) which you can use to edit a table on the client-side only.
To make the changes permanent, you could then get the data from the table using
rows().data()
and save it to the database. The PHP libraries for Editor will not help with this use case. You would need to save the data yourself - the PHP libraries are for use with the case where you save the rows to the database as they are created.Regards,
Allan
I understand.
But I have to create a transaction that covers all operations (include in the database the data from my header, from my datatable and change my internal stock table) from this screen (http://i.imgur.com/Pf4sN8S.png) .
The problem is that I do not know how I can access the data of my Datatable in my sever-side.
Is there any way I can access data from the datatable in my store and update method and manipulate them within these methods? Maybe a configuration where the datatable creates invisible inputs for each cell of the table and submits them along with the inputs of my header, so that I can access them freely on my server-side.
Thanks for the screenshot. It still looks like
rows().data()
is the one you want to use. That will give you the data that is in the table and you can submit it to the server-side.Regards,
Allan