1

The Problem in Hand: I want to make a form designer where user can drag and drop fields of different type and design the layout too, some what similar to wufoo form builder but here the layout is limited to single column whereas I want to make something where user can make the layout as they want.

I understand how to do in single column view, but could not understand how to achieve multiple column layout eg: row 1 there could be 3 elements, row 2 one element stretched to full length, row 3 there could be just 2 elements etc.

What I tried: I have tried with jquery UI sortable to make a single column layout with using div where new elements can be dragged and repositioned.

Any suggestion on how to proceed further will be helpful

I have tried searching StackOverFlow and google but could not find any link on a similar topic. If anyone could point me to the same, it will be also helpful.

4

1 回答 1

0

当您在wufoo form builder上重新排序元素时,您只能向上或向下拖放。删除该限制,一旦一个元素被拖过某个阈值,它就“属于”下一列。如果“旧”列是第一列或最后一列,并且元素移动到的行位于表单的“外部”,则在此处添加新列,直到达到最大列数。

如果 used 将一列的最后一个元素拖到另一列中,请在 element-drop 上删除现在为空的列。

您还可以删除动态添加/删除列,并且 juist 有一个按钮(“删除列”和“添加列”)通过代码来完成。

可以在此处找到删除另一列的示例:http: //jqueryui.com/sortable/#connect-lists

希望这有帮助!

编辑: http: //jqueryui.com/sortable/#portletshttp://jqueryui.com/sortable/#empty-lists也有你可以查看的元素。祝你好运!听起来是个不错的项目。我们能看到任何进展或测试版吗?

于 2013-08-18T19:00:14.583 回答