开发者

JavaScript forms on the fly, no HTML forms [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

I am trying to build a web application that will take an scan paper form and in top of it I will be able to add text boxes using JavaScript like jQuery that later on I can use to fill the form and print it as PDF or email it.

My question is about the JavaScript, is there any existing library that will allow me to to drag and drop text boxes (note I don't want a text field) and that will remember its location?

The forms will have a lot of fields that and the forms will change a lot from one to another that is why I am not converting the forms into regular HTML forms. For the backend I plan to use Drupal in LAMP, so jQuery is included already.

Thank you.

Note: I still do开发者_如何转开发n't understand why this question was close, but just for reference in case someone has a similar question the solution was to use the jquery annotate image pluging. By using this plugging I was able to click anywhere in the image and add text to it. I also have to make some changes so that it can also show the anotatations without waiting for the mouse over.


Yes, you can use JQuery drag and drop, YUI drag and drop or other libraries to drag around dom elements, including form fields.

But you will still need to write a good amount of software to create a working application.

Depending on your skill level, the amount of work will either be doable or you'll need to hire a programmer... Good luck.

Added Re: remembering the location of the fields. When you get a "drag ended" event, you can query the library to find out the current location of the field that was dragged. At that point, you'd probably use Ajax to store/update the field's new location in your database, on your server.

You may also want to check out FormAssembly, Mufoo and other form packages to see if you can use your own background (the scanned image) for the form.


If I understand correctly you want this designer-like function of locating text boxes as overlays on images to work in the browser — your application is the designer, not the ultimate form filler?

Check out jQuery draggable to accomplish the moving around. You'll need to persist the layout yourself, but it shouldn't be hard. You can do it with a Save button, or you can actual use the Stop() event defined by draggable and persist changes as they happen.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜