Closed mankramo closed 3 years ago
Hi mankramo,
You may submit the HTML form that contains your AppendGrid
directly and get the values by following PHP code:
<form action="url_to_your_php" method="post">
<table id="datatable-checkbox"></table>
<button type="submit">Submit Data</button>
</form>
$rowOrders = explode(",", $_POST["datatable-checkbox_rowOrder"]);
for ($x = 0; $x < count($rowOrders); $x++) {
$name = $_POST["datatable-checkbox_name_" . $rowOrders[$x]];
$short = $_POST["datatable-checkbox_short_" . $rowOrders[$x]];
$unit = $_POST["datatable-checkbox_unit_" . $rowOrders[$x]];
...
}
@hkalbertl thank you very much. Please how about populating an appendgrid table with data from the database. there is a select field in one of the tables and the options needs to come from the dB. How do I get the data from my dB into the append grid table
Hi, I am not familiar with PHP but I believe you should able to load records from your database and send these records in JSON format to client. After that, you can make use of the load method to populate the data in AppendGrid
. Please check the Basic Demo.
var myAppendGrid = new AppendGrid({ /* Initial Parameters */ });
...
myAppendGrid.load([
{ name: 'Name 1', short: 'Short 1', ... },
{ name: 'Name 2', short: 'Short 2', ... }
]);
Hello, I am quite new to Javascrpt and PHP. How can i submitted data to PHP server below is my code for initializing and taking the data `