开发者

Triggering new extra forms in django admin

Is there a开发者_JAVA技巧 way to trigger new extra form adding in django inline form?

I mean, when user clicks "Add new inline", I would like to execute some javascript code in the meantime.

Cheers, Tomek


Yes! You have to use http://api.jquery.com/trigger/ like this:

$('a').click(function(){ 
    $("form:first").trigger("submit");
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜