Page 1 of 1

Form Core Replacement

Posted: Tue 13. Dec 2011, 16:05
by santscho
Just completed the "content23" replacement (CP Form). The phpwcms generates now css instead of table based forms.

Download:
https://github.com/santscho/phpwcms-better-form

Features:
- Supports both layouts (a) label and field in one row and (b) label and field in separate rows
- Comes with the complete CSS for all form elements
- No classes need to be defined in the form CP
- CSS3 enhanced for better looking forms
- Separate containers for default/success/error message
- Form errors listed in <ul><li> instead </br>
- "Break" as horizontal text divider (fieldset replacement)
- "Break Text" can be used as sub divider
- Checkboxes and radiobuttons nicely displayed in all possible cases

Not done yet:
- Form behave when form built in custom mode
- CSS: Styling of the error list
- CSS: Styling of the default/success/error box

Re: Form Core Replacement

Posted: Tue 13. Dec 2011, 16:12
by santscho
For Testing just download from github. backup the original file. Integrate the CSS in your template (recommended to backup previous CSS and then delete all form classes before importing my classes). Finally, just create a basic dummy form without any classes.

Re: Form Core Replacement

Posted: Tue 20. Dec 2011, 16:36
by marcus@localhorst
Hei,
thanks for the work. Sometimes I hacked the core too, but it gets ugly if a) the developer don't develop it any longer and b) the original files are updated by OG and a) happened.
I think the Form CP has great possibilities for custom forms, especially the render hooks/custom functions and stuff, so it is possible to use tableless forms. Also I would recommend to write frontend_render scripts to manipulate the DOM instead of hacking the corefiles (using phpQuery or something similar).
And last but not least - it's always possible to adapt a contentpart and transform it to a Module, which act like the original CP (incl own enhancements).

So using this hack, always depends on you as developer to keep it up to date and there are a lot of orphaned mods here for phpwcms, where nobody knows if they still work. I myself wrote stuff I don't rememeber anymore ^^.

This is just what I think and it's no offense ;-)

cheers marcus

Re: Form Core Replacement

Posted: Fri 23. Dec 2011, 09:53
by santscho
Thanks Marcus for your input

I am in contact with Oliver. He will optimize my code and adapt it in the core of phpwcms.

Re: Form Core Replacement

Posted: Fri 23. Dec 2011, 09:55
by marcus@localhorst
santscho wrote:Thanks Marcus for your input

I am in contact with Oliver. He will optimize my code and adapt it in the core of phpwcms.
That's much better :) cheeers