0
我想使用SheepIt:Email-Address和Email-Address-Type複製兩個字段。這些應該每次重複。我有這個工作已經,這裏是HTML:SheepIt:每個重複表單上多個值的數據注入?
<div class='form-group'>
<label>Emails</label>
<div id='emails-form_controls' class='inline'>
<div id='emails-form_add' class='inline'>
<a class='btn action highlight-color'>
<span>Add email</span>
</a>
</div>
</div>
<div id='emails-form'>
<div id='emails-form_template' class='multiple-form'>
<input type='text' name='emails[#index#]' id='emails-form_#index#_email' class='form-control auto-width inline' />
<select name='etypes[#index#]' id='etypes-form_#index#_etype' class='form-control auto-width inline'>
<option value='1'>Default</option>
<option value='2'>Personal</option>
<option value='3'>Work</option>
</select>
<a id='emails-form_remove_current'>
<i class='fa fa-times-circle delete-icon'></i>
</a>
</div>
<div id='emails-form_noforms_template'>No emails</div>
</div>
</div>
當我嘗試做數據注入我按照SheepIt example on their website,所以我說此Javascript:
var sheepItForm = jQuery("#emails-form").sheepIt({
separator: "",
allowRemoveLast: true,
allowRemoveCurrent: true,
allowRemoveAll: false,
allowAdd: true,
allowAddN: true,
maxFormsCount: 0,
minFormsCount: 0,
iniFormsCount: 0,
data: [{'email':'[email protected]', 'etype': '3'}]
});
我看到了「workemail @ work.com「出現,但類型不變。 注意:我知道SheepIt的select tag選項並且已經修復了它;我有它已經開始着手另一個下拉字段
我的問題就變成了,簡單地說:
如何獲得多場SheepIt形式數據注入填充的第二場?