| Component bare bones |
| Forms | |||
| Written by Mostafa Muhammad | |||
|
A quick update I've been working in the past few days on writing bare bones of the backend of my component, thanks to my mentor (Ray =) ) and MVC Guide I was able to do it. For the backend I'm thinking
I've already committed the backend bare bones to the SVN. Note : Ercan notified me that the backend entry point to my component shouldn't have the "admin" (unlike 1.0.x, thanks Ercan :) ) A few words on the WYSIWYG EnvironmentThe WSYIWYG Environment is simply composed of a workarea and a list of draggable form elements "Similar to JotForms" Each element is loaded separately as a plugin, any plugin "element" is handled by two files: A Javascript file This file contains a class that inherits from a base javascript class "CElement" and overrides various method of the base class. "I'm using mootools for JS inheritance" The WYSIWYG Environment triggers a set of events like "onDragStart, onDragEnd, onResizeStart,onResizeEnd, onUpdate,onDelete,etc.." and passes them to the concerned element , this element class is expected to handle these events. An XML file This file will contain meta information about the element like its name, description,storage requirements "Number and type of DB fields required per record", default width and height in the environment. The wysiwyg environment will use the information in this XML file to automatically generate input fields and javascript code required to allow the administrator to alter properties of any element in the wysiwyg environment. This is an example file that describes the "button" form element
The <param> tag defines properties of the element that can be altered in the WYSIWYG environment, here we have two properties, one is the label of the element "i.e the text written on the button" and the "Type" which has one of two values "Submit" or "Reset", it is clear that the button element doesn't have any storage requirements, Things will become more clearer when you see the code in action and play around with XML files. :) I'm almost done with the WYSIWYG environment , I just need to clean the code up and add a few comments here and there before I commit, that's too much for "A few words" , have a pleasent day :).
|




Wednesday, 11 June 2008
Thursday, 05 June 2008
My implementation is based on mootools and is nearing completion ( around 85% done ), you can checkout the SVN to see it in action, Your feedback is greatly appreciated
Wednesday, 28 May 2008
Have you taken a look at the WYSIWYG javascript based form editor I built for Attend Events? It may give you some ideas of how developers might want to extend the basic form elements (ie fees). Unfortunately, (1) I didn't have time to put a proper back-end behind it, and (2) it uses prototype, so I imagine it's going to be difficult to port to mooTools and J1.5.
Friday, 23 May 2008
The Editor itelf is similar to jotform (jotform.com) but goes a bit further by allowing elements to be resized.
I've just committed to the SVN a working editor, maybe you would like to check it out
@Ian , Thanks for tip
Friday, 23 May 2008
While it is true that in Joomla! 1.5 you no longer need the prefixed admin in front of your entry point, this is certainly not a requirement nor necessarily recommended. In fact, the framework will look for the admin.xyz.php file first and will then look for the file without the prefix.
Wednesday, 21 May 2008
Wednesday, 21 May 2008