Skip to content

Instantly share code, notes, and snippets.

View gabelorm's full-sized avatar

Gabelorm gabelorm

View GitHub Profile
A form populates a table from form entry with a unique ID. After the submit button is clicked, it creates a file where you can save and print. It works perfectly but when an entry is edited, any subsequent entry doesn't create a new file but rather update the last entry. In other words, the unique ID doesn't increase anymore unless the system is relaunched.
Below is the function for my create button
$('#create_btn').click(function () {
$('#create_invoice').get(0).reset();
$('#action').val('create_invoice');
$('#title').text('DONATION');
$('#action_create_invoice').val('Donate');
$('#invoice_items').empty();
calculateTotal();