我可以使用SheepIt JQuery插件来嵌套多层克隆表单吗? [英] Can I have multiple levels of nested cloned forms using SheepIt JQuery plugin?
本文介绍了我可以使用SheepIt JQuery插件来嵌套多层克隆表单吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试过了,没有用,使用SheepIt在另一个nestedForm里创建一个nestedForm!插入。这甚至有可能吗?
扩展演示7 关于SheepIt!网站,我试图在 JSFiddle 中添加额外的嵌套表单
但是我得到一个indexOf错误......
删除以下部分以摆脱错误但打破预期的功能: JSFiddle
,
nestedForms:[
{
id:'person_addresses_#index#_phones_#index_phones#_tests',
options:{
indexFormat:'#index_tests#'
}
$ / code $ / pre
解决方案 Add这一行在that声明后正常工作normalizeFieldsForForm
var nameTemplateAttr = that [0] ['name'];
I have tried, with no avail, to create a nestedForm inside of another nestedForm using the SheepIt! plugin. Is this even possible?
Extending Demo 7 on the SheepIt! website, I tried to add an additional nested form in JSFiddle
But I get a indexOf error...
Remove the following section to get rid of the error but break the intended functionality: JSFiddle
,
nestedForms: [
{
id: 'person_addresses_#index#_phones_#index_phones#_tests',
options: {
indexFormat: '#index_tests#'
}
}
]
解决方案 Add this line to function normalizeFieldsForForm after "that" declaration
var nameTemplateAttr = that[0]['name'];
这篇关于我可以使用SheepIt JQuery插件来嵌套多层克隆表单吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文