Last active
June 14, 2016 19:46
-
-
Save techslides/cdc11e7211b26499df35364989f8d170 to your computer and use it in GitHub Desktop.
Call a function after in-place edit loads a form
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//change the formibdale.js file here: https://github.com/Strategy11/formidable-forms/blob/master/js/formidable.js#L3547 | |
success:function(html){ | |
$cont.children('.frm-loading-img').replaceWith(html); | |
$edit.removeClass('frm_inplace_edit').addClass('frm_cancel_edit'); | |
$edit.html(cancel); | |
//ADD THIS: call some function if it is defined | |
if (typeof inlineEditCallback == 'function') { | |
inlineEditCallback(); | |
} | |
} | |
//then define your function somehwere else (js file, template file, etc) | |
function inlineEditCallback(){ | |
//perhaps load a script that is needed | |
$.getScript( "your-script.js", function( data, textStatus, jqxhr ) { | |
//your code based on your script and Fromidable Forms inline form being loaded | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment