I want a button (other than the submit button), on click, to generate a set of new fields in a contact form. I’m using Contact Form 7 on WordPress.
$("table")
.on("click focus", ".item.inactive", function(e) {
var curRow = $(".item.inactive");
curRow.clone().appendTo("table tbody");
curRow.removeClass("inactive").find("input:first").focus();
})
.on("click", ".icon.delete", function(e) {
$(this).closest("tr").remove();
});
$("button").on("click", function(e) {
$(".item.inactive").click().find("input:first").focus();
});
Like this: http://jsfiddle.net/Y8Vh9/23/
I have few questions that hopefully someone can answer.
Would I have to create a .js file?
Or would I need to edit a js file in the plugin’s folder?
Can I add the js snippet into the theme via Advanced Settings?
Or I would I need to modify additional files to have this work?
I’m a WordPress newbie.
Thanks!