PDA

View Full Version : Wanted: Dynamic Forms



mradamcole
13 Dec 2008, 8:29 PM
Objective
I have a really cool project for which I am looking for help. I need to be able to render dynamic forms. The form definitions would be stored in a text file or database. The form definition would be passed to a rendering engine which would generate the HTML form that appears on the screen.


Example
For example, a simple source file may look like this:



title: "Simple Contact Form",
fields: [
{
fieldType: "label",
text: "Please enter your name"
}, {
fieldType: "textfield",
name: "User_Name"
}, {
fieldType: "label",
text: "What is your date of birth"
}, {
fieldType: "datefield",
name: "DOB"
}, {
fieldType: "label",
text: "What is your country of birth"
}, {
fieldType: "combo",
name: "User_Country",
values: [ “Afghanistan”, ”Albania”, “Argentina”,… ]
}]The rendering engine will process the form definition file and generate an HTML form which looks something like this:



Please enter your name [___________________]
What is your date of birth [__________][calendar]
What is your country of birth [_Afghanistan_|v]


Role of Ext JS
Rather than generating the raw HTML, the rendering engine can generate Ext JS code, which in turn will produce the raw HTML. (This way, Ext JS can look after much of the low level tasks such as cross browser compatibility issues, pretty formatting, rich layout, etc.)


Why Dynamic forms?
I need these forms to be dynamic as I wish to attach the following events to each field. (If the forms were to be hard-coded than each field would need to have these events hard-coded. Over time it is much easier and less error prone to dynamically generate the form and events.):


Inline client validation: OnChange will validate the value against a mask and/or regular expression. (E.g. A text field which expects a phone number will use a phone number regular expression to enforce the appropriate data entry mask.)
.
Inline server validation: On loss of focus the value will be passed to the server for server side validation. (E.g. The server may ensure the value is appropriate given a lookup against the database. For example, the server may check that the area code is appropriate for the home address.)
.
Conditional branching: A group of fields are enabled/disabled based on a previous response. (E.g. On a medical form, if the user specifies they are female then a number of questions relating to pregnancy will be enabled.)
.
Soft and hard warnings: Any validation can produce a soft warning or a hard warning. The form can be submitted with a soft warning; however, the form cannot be submitted with a hard warning. (E.g. On a medical form we may expect that a person’s pulse is between 50 and 100 bpm. A pulse of less than 1 bpm or greater than 300 bpm is inconceivable so values outside of this range will produce a hard warning – clearly a data entry error which needs to be corrected. A pulse between 1 and 50 or between 100 and 300 is unlikely but possible. As such these values will produce a soft warning.).
.
Field status: A discrete icon will appear beside each field indicating its status. (E.g. A green stoplight indicating the value is legitimate; a yellow stoplight indicating a soft warning; a red stoplight indicating a hard warning; no lights on the stoplight indicating no value has been entered yet.)
.
Edit tracking: When a previously saved form is edited, the user may be asked to explain why they are changing a given value. (E.g. This is common in regulated industries. In a clinical trial if a doctor changes the patient’s pulse on a form which was previously saved, the doctor will be asked to explain why they are changing the value.).

Visual Designer
Dynamically generating the form is my primary requirement. My secondary goal is to have a GUI to help design the form. (This will allow laypeople such as medical professionals to setup the forms rather than relying on developers.)


Note: GUI Designer (http://www.webblocks.eu/designer/index.php) is an excellent tool for laying out an entire page. What I am looking for is something similar. But, where GUI Designer is focused on a general purpose page, I need something focused on data entry forms. Additionally these forms will require unique properties such as conditional branching, soft and hard warnings, etc.


Reward
Can you help me out? If so I am happy to pay for this solution. I will pay $20,000 for the first solution which meets my requirements.

Please let me know if you are interested and I will post my full requirements.

Background
Soliciting the world wide development community such as I am doing with this offer is a first for me. I hope my approach is acceptable. (The forum rules say nothing about offering rewards for assistance. Besides, I figure since I am offering money as opposed to asking for money this will be seen in a positive light. If anybody takes issue with my offer please let me know. It is my intent to be a good Ext JS citizen.)


I am a director of software and technology solutions for a large health care company. These dynamic forms are the first of many modules for a big system we will be undertaking this year. I have an internal development team which I will need to augment for this project. Before hiring contractors I am conducting this offer as an experiment as I believe I can get better quality code, faster, and less expensive from you – the passionate hobbyist/professional. Your feedback is appreciated.

mjlecomte
13 Dec 2008, 11:02 PM
Sounds like you could use metaData to autoconfigure the form for you.

There is another GUI tool in the skunkworks, not sure if it will be unveiled soon or not. The rest of your goals seem rather straightforward.

You may want to update your post to indicate if you have a backend already in mind.

Razhick
13 Dec 2008, 11:19 PM
How about:
http://extjs.com/forum/showthread.php?t=18023

mjlecomte
13 Dec 2008, 11:25 PM
How about:
http://extjs.com/forum/showthread.php?t=18023

I don't see how that helps the OP's situation. Can you explain?

mradamcole
16 Dec 2008, 8:35 PM
Sorry Razhick, but the RemoteComponent plugin does not appear to be what I am looking for. You are correct, it is similar in that it dynamically creates components. But, I need something which is far more form oriented. (Similar to the forms within Google Docs.)

Here are some screenshots for a prototype:

http://docs.google.com/Presentation?id=dgx4k2rp_58f8cxmvg9 (http://docs.google.com/Presentation?id=dgx4k2rp_58f8cxmvg9)

This is an application we built and it is used by doctors everyday in several countries. However, it only works in IE and it is not as modular as I wish.

evant
16 Dec 2008, 9:05 PM
Ext offers consulting services. If you'd like, send an email with some of your details to services@extjs.com.

bigice
22 Dec 2008, 2:01 AM
Hello..

i have made something like that please check my post:http://extjs.com/forum/showthread.php?p=265725#post265725

I HOPE YOU LIKE IT!

lombras
24 Dec 2008, 4:00 AM
Hello Mr. Adam Cole,

First, I introduce myself, my name is Rodrigo and i working with EXT since 2004, and im full programer in PHP, Mysql, Sql Server and Oracle.

I'm sure I can help you develop your solution, because I have the knowledge and I have a team at my disposal.

I would like you to send a message or email with details of your project.

Thank you and happy Christmas!
Rodrigo Lacerda
Email: internetwaves@gmail.com

mystix
24 Dec 2008, 7:09 AM
... and i working with EXT since 2004 ...


that's new... i thought Ext didn't exist pre 2005... :-?

Nash-T
29 Dec 2008, 2:00 PM
Excluding the GUI designer part, our extjs dynamic forms application does most of this. We may be able to work something out if you are not a competitor. Even if you are a competitor I'm glad you have chosen extjs and dynamic forms.

www.sanmateowaveforms.com (http://www.sanmateowaveforms.com) or skip the marketing and log in with your gmail account to http://smw.appspot.com

There is also a Plone version at www.medicinebrain.com (http://www.medicinebrain.com)



Contact me via private messages on this board if there is interest.
-Tim

arun Thakur
18 Mar 2010, 4:00 PM
I am new to ExtJs and started couple of months back. I have experience with other Javascript frameworks.I find this forum very helpful so thanks to all. I have similar requirement I have to generate forms for my application using some xml code from server. Can anybody suggest me how I should proceed as these forms are not simple forms, one form could have multiple pages( eg questionnaire, survey forms). I thought of couple of options.
a) May be I can write util functions using JavaScript or extJs xml parser to generate raw html from these xml files and then rendering that html to dom node. (least interested in this) b) Or I can write a utility will generate the extJs component JSON and use the Ext.ux.Plugin.RemoteComponent plugin to generate form.(http://www.extjs.com/forum/showthread.php?t=18023)

Any suggestions?

thx,
-a-

alien3d
18 Mar 2010, 5:31 PM
that's new... i thought Ext didn't exist pre 2005... :-? time of yui 0.33 maybe.I start yui april or may 2005.something like that.not sure.B)

Animal
19 Mar 2010, 12:12 AM
I am new to ExtJs and started couple of months back. I have experience with other Javascript frameworks.I find this forum very helpful so thanks to all. I have similar requirement I have to generate forms for my application using some xml code from server. Can anybody suggest me how I should proceed as these forms are not simple forms, one form could have multiple pages( eg questionnaire, survey forms). I thought of couple of options.
a) May be I can write util functions using JavaScript or extJs xml parser to generate raw html from these xml files and then rendering that html to dom node. (least interested in this) b) Or I can write a utility will generate the extJs component JSON and use the Ext.ux.Plugin.RemoteComponent plugin to generate form.(http://www.extjs.com/forum/showthread.php?t=18023)

Any suggestions?

thx,
-a-


I suggest that the transformation from XML to JSON configuration be done on the server.

arun Thakur
20 Mar 2010, 11:48 PM
Animal, Thank you for your reply. Your replies and suggestions on this forum are really very very helpful.Thanks again. Any specific reason I should generate JSON from xml on server side instead of doing it in JavaScript??