Weekly Update
Hi!
Hopefully you have been to the midweek demo that I had provided a few days back. After that update, I tried to support other widgets. Hence here's the new demo and below is the report:
Changes(since last week):
- UI changes for the reuquired functionality.
- Manipulation of JS form Object using following functions.
2.1 addItem(widgetType)
2.2 deleteItem(widgetID)
2.3 synchronize(widgetID, widgetType, source) functions. - Provision of the third column to show the properties for the currently selected item.
- Temporary arrangement of a button(title of middle column for viewing the JS form object)
Notes:
- Not all the properties get updated(most of them do). Also not all the properties of a widget(as described in Form API) are implemented. This is so because, It is a easy task and can be done once the structure is final.
- I have commited the source to the contribution repository in /modules/formbuilder. Though this is still not worth viewing. Loads of documentation and cleanups have to be done yet.
- The libraries needed to run the application along with other files can be downloaded from here: http://www.freewebs.com/socdemocode/prototype1.zip
Questions:
- what is the difference between many checkbox widgets and a checkboxes widget having many options? Similarly for radios?
- I have used delete form[widgetID] in JS to delete a form widget. "But I read that it is not suppported below js version 1.2. Is it true? can someone please check?"
- I was for some unknown reason not able to chenge the #default_value for 'file' widget in the DOM preview. Is it used any where and is it a big Issue?
Goals for next week(s) (Please tell me if there are more important things to be done before those listed below.):
- Make it work on IE.
- Create the proper .module file for the formbuilder so that It can be tested with drupal website.
- Create all the proper Validation functions for the HTML properties modified through 3rd column.
- Include rest of the widgets, remaining properties of the existing widgets.
Finally.... Please look at the demo and indicate all the bugs here.
Thanks in advance :)
avi
Groups:
Login to post comments

hu?
played a bit with your demo at http://freewebs.com/socdemocode/prototype0/
seems to work in FF, but does nothing in Opera...
Q: what's a form builder alone good for? how would it be bound to a (any) drupal module to replace it's gui? havent read on that...
Christoph C. Cemper
http://www.marketingfan.com
http://www.cemper.com
Well yes... It is for now
Well yes...
Meanwhile... Thnks for pointing that out and checking out the demo.
avi
Some suggestions
Checkbox creates a single checkbox while checkboxes creates an array (ditto for radio/radios). The singular versions are used e.g. when we need finer control (for instance, I think, a single checkbox can have a title and description). I think you'll need to support both the singular and plural methods.
See
function isJsEnabled()in drupal.js for an example of how we test for required methods. I guess you'll need to test as well for the delete method.See this issue: http://drupal.org/node/60046. It looks like you can forget about trying to support a default value for file fields.
I'm getting some Javascript errors in the demo, when I click to create a Text component and then click Edit.
Good to see your progress. Keep the questions coming!
yes...
That button still is not complete. I initially thought that there might be cases when we just need labels(wufoo and jotform have this). But after looking at the Form Reference API, I found out that labels do not have a direct counterpart in Form API. We can use #markup to do the work though. So I left it for the moment.
Am I thinking in the right direction? i.e. #markup should be used in place of labels?
meanwhile... I got the .module file you sent.
I'm also getting these error in Firefox (1.5, Windows):
when I mouse over form editing elements (e.g., I've created a few new elements and mouse over them).
the new JQuery version...
JQuery has been lately seeing many changes. The Version I used in mid-week demo was rev #88. Jhon recently released 1.0a and so I used that for the latest demo. Due to the buggy nature of this alpha version, I had to "hide" some of the functionality (Like u could add checkboxes, radios from preview column.) For now, I have been ignoring the Errors(which do not effect functionality) and warnings(there were hardly 5 when I used rev #88). As we move towards a more stable build, I Asume that these errors are going to go away.
Sould I focus on these errors now or work on rest of the things and remove these errors when a staabler version comes out?
more...
I was searching more on it and It turns out that it is a bug with FF etc. Here' are the bug reports: https://bugzilla.mozilla.org/show_bug.cgi?id=208427
and
https://bugzilla.mozilla.org/show_bug.cgi?id=214340
Apperently it comes when one tries to find out the parentElement of a form widget.