Add Records - lokothodida/DM_Matrix GitHub Wiki
Once you have table created and have your fields defined you can enter your records.
From the main tab, click the table's name. You will be directed to the 'View' page.
Click 'Add Record' and you will be shown a form that allows you to input data into the table.
Fill in the relevant data and click 'Submit' to save.
If you wish to input data from a form outside of The Matrix, you can easily do so, whether it is the admin back-end or the user front end. First ensure that you have the form displayed on the page (details on displaying forms are covered in Displaying Forms).
Note: this example presumes that The Matrix has been instantiated with the variable $var and our table name is 'foo'.
<form method="post">
<?php $var->displayForm('foo'); ?>
<button>Submit</button>
</form>
Ensure that the method attribute has been set to 'post' and that you have a 'Submit' button. Once the query has been sent, the server needs to use the post data to then input the values into the database. The following code will do that:
if ($_SERVER['REQUEST_METHOD']=='POST') {
$var->createRecord('foo', $_POST);
}