Add new row based on input
Add new row based on input
ramhanuman
Posts: 2Questions: 0Answers: 0
I'm creating a registration page where someone can register up to 20 other people if they wanted to. So I have these text boxes:
[code]First Name:
Last Name:
Email:
[/code]
This is my html table with my JQuery intialization of DataTables:
[code]
First Name
Last Name
Email
[/code]
[code]
$(document).ready(function(e) {
$('#reg_more').dataTable({
"bLengthChange": false,
"bInfo": false
});
});[/code]
Now I want to put an add button so that the user can input the first and last name, and email and hit add, and it will be put into the table. How do I go about doing this? Thanks
[code]First Name:
Last Name:
Email:
[/code]
This is my html table with my JQuery intialization of DataTables:
[code]
First Name
Last Name
[/code]
[code]
$(document).ready(function(e) {
$('#reg_more').dataTable({
"bLengthChange": false,
"bInfo": false
});
});[/code]
Now I want to put an add button so that the user can input the first and last name, and email and hit add, and it will be put into the table. How do I go about doing this? Thanks
This discussion has been closed.
Replies
The Editor plug-in for DataTables ( http://editor.datatables.net ) does a lot of this for you :-). You basically just specify the fields that you want.
Allan
I am having a very similar situation. I need to add rows first to the dataTable, then insert one summary record to the DB, using that transaction id, insert the rows added in the dataTable to the details table.
So can we just add the rows to the DT?
Thanks,
Girish