form_field_nested_form.html 1.2 KB

123456789101112131415161718192021222324
  1. <bx_repeat:items>
  2. <div id="bx-nested-form-__nested_type__-__key_value__" class="bx-nested-form-ghost bx-def-margin bx-def-padding bx-def-border bx-clearfix">
  3. <div class="bx-nested-form-ghost-form">
  4. __form_code__
  5. <div class="bx-nested-form-actions bx-def-margin-top bx-clearfix"><a class="bx-btn bx-btn-small" href="javascript:void(0);" onclick="__js_instance_name__.deleteGhost(this, '__nested_type__')"><bx_text:_sys_form_input_nested_form_button_delete_item /></a></div>
  6. <input type="hidden" name="__key_name__[]" value="__key_value__" class="bx-def-font-inputs bx-form-input-hidden">
  7. </div>
  8. </div>
  9. </bx_repeat:items>
  10. <div id="bx-form-input-nested-form-forms-__uniq_id__" class="bx-form-input-nested-form"></div>
  11. <div id="bx-form-input-nested-form-input-__uniq_id__" class="bx-def-margin bx-clearfix">
  12. <button type="button" class="bx-btn bx-btn-small"><bx_text:_sys_form_input_nested_form_button_add_new_item /></button>
  13. </div>
  14. __info__
  15. __error__
  16. <script>
  17. $(document).ready(function() {
  18. __js_instance_name__ = new BxDolNestedForm(__options__);
  19. $('#bx-form-input-nested-form-input-__uniq_id__').on('click', function () {
  20. __js_instance_name__.addEmptyGhost();
  21. return false;
  22. });
  23. });
  24. </script>