JS: saveRecord

Java Script Layout Tab inserts provided code before tag.

There is a method to create or update table records using JavaScript. CustomTables handles data sanitization and validation.

Example HTML(Desktop) layout tab:

<button onClick="SaveMe();" class="btn">Save Me</button>

Example Java Script layout tab:

function SaveMe()
{
    const record = new CustomTablesEdit();

    //Save record
    record.saveRecord('/phone-book',{ 'name': 'Ivan', 'email': 'info@ct4.us' },36);

    //Reload table row
    record.reloadRecord(36);
}

What are your feelings

Leave a Reply

Updated on January 6, 2025