Joined October 2017
·

Shotty

thanks to this i could implement the solution. beware that the JavaScript of the screencast is old and faulty.
Also, linktofunction is not available in 4.2 anymore. You have to use link_to with onclick

function remove_fields(link) {
$(link).prev("input[type=hidden]").val("1");
$(link).closest(".fields").hide(); }

function addfields(link, association, content) {
var newid = new Date().getTime();
var regexp = new RegExp("new" + association, "g");
$(link).parent().before(content.replace(regexp, newid));
}

Achievements
1 Karma
0 Total ProTip Views