Hi. I've adapted your example to have a button to add more inputs on this link:-
http://www.chronoengine.com/faqs/2700-how-can-i-have-a-button-to-add-more-form-inputs.html
I've got it to load saved inputs from the database but am stuck on how to adapt the JavaScript code to show these inputs and not just one empty one to put a new one in.
I think where you have this code:-
// display the next row and hide the last 'Add one' button
If you have say 5 inputs you would need to somehow call this 6 times to show all inputs and an empty one at the bottom to put another in.
http://www.chronoengine.com/faqs/2700-how-can-i-have-a-button-to-add-more-form-inputs.html
I've got it to load saved inputs from the database but am stuck on how to adapt the JavaScript code to show these inputs and not just one empty one to put a new one in.
I think where you have this code:-
// display the next row and hide the last 'Add one' button
function addOne(id) {
$('addone_'+id).setStyle('display', 'none');
$('recipient_'+id).setStyle('display', 'block');
};
If you have say 5 inputs you would need to somehow call this 6 times to show all inputs and an empty one at the bottom to put another in.