简体   繁体   English

自定义字段映射,拖放HTML / JS

[英]Custom field mapping, drag and drop in HTML/JS

I need to create an interface where users can "map" fields to other fields. 我需要创建一个界面,用户可以在其中将字段“映射”到其他字段。

The fields on the left are internal Database fields, and the fields on the right are fields which exist in an external CRM application. 左侧的字段是内部数据库字段,而右侧的字段是外部CRM应用程序中存在的字段。

The user needs to be able to map fields, for example if they decide to map 3 fields (firstname, company and email address) the UI would show in some form that the internal field firstname maps to the external field FirstName. 用户需要能够映射字段,例如,如果他们决定映射3个字段(名字,公司和电子邮件地址),则UI将以某种形式显示内部字段firstname映射到外部字段FirstName。

I do not have any code to show, just wondering if someone knows of any tools/jquery plugins? 我没有任何代码可以显示,只是想知道是否有人知道任何工具/ jquery插件?

My current idea is to have 2 select boxes and have the user select a value in both and click Add Mapping. 我当前的想法是要有2个选择框,并让用户在两个框中都选择一个值,然后单击“添加映射”。 This would work but just wondering if there are slicker ways out there. 这会起作用,但只是想知道那里是否有光滑的方法。

There is jQuery's Draggable which allows elements to be moved using the mouse. jQuery的Draggable允许使用鼠标移动元素。

And, then there is also jQuery's Droppable which creates targets for draggable elements. 而且,还有jQuery的Droppable ,它为可拖动元素创建目标。

They both combined can help you create your HTML interface. 两者结合可以帮助您创建HTML界面。

All the best. 祝一切顺利。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM