Closed GoogleCodeExporter closed 8 years ago
Sounds like a good idea. Some of the finer details may be a challenge to
integrate into class.form.php though.
How would js/php error checking work with the modularized form elements? Which
of the current elements
would be considered standard?
- Andrew
Original comment by ajporterfield@gmail.com
on 20 May 2010 at 1:54
Perhaps all elements should be modularized, since there isn't really any
benefit to
having some of them hard-coded in the class.
There could be two different ways they could specify how the element will be
checked,
a simple way where they can just set a single regex or a more complex way where
they
could specify a function for checking the input.
The form class will then use that regex/function to decide it the input is
valid, and
then create then handle creating the js/php validation checking and error
message output.
I'm imagining there will be a folder in includes/ called "modules" and inside
multiple files.. textbox.php captcha.php googlemap.php etc
Inside each will be a standardized structure, (element object?) , and it will
set a
few variables such as:
htmloutput
jsoutput
validation
and others that will be obvious when we actually implement it.
I think before we start to try and implement this we should create an element
with a
good structure, and afterwards actually convert the current elements to that
structure and make the form class handle it.
Original comment by moncojhr@gmail.com
on 21 May 2010 at 4:57
Many of the ideas brought up in this issue thread are included in the 2.x
branch. I'm calling this issue closed.
Original comment by ajporterfield@gmail.com
on 14 May 2011 at 3:25
Original issue reported on code.google.com by
moncojhr@gmail.com
on 19 May 2010 at 6:31