Closed rudddy closed 5 years ago
I got it with
` $('.repeater').repeater({
// (Optional)
// "defaultValues" sets the values of added items. The keys of
// defaultValues refer to the value of the input's name attribute.
// If a default value is not specified for an input, then it will
// have its value cleared.
defaultValues: {
'name1': '',
'name2': ''
}
});
`
I would like to be able to pre-fill a few lines from my database, and use the repeat button to create more lines. Only by clicking on the button, the form is always filled with the data from the first line when I would like to have it empty.
The code is available here: https://jsfiddle.net/vq1wLxs3/
Thanks