SourceForge has been redesigned. Learn more.
Close

#11 Even easier to user engine

Feature_Request
open
nobody
Core Engine (5)
5
2001-03-28
2001-03-28
No

Alright, thinking a little further on the idea of using
structures (to replace the need to remember that [0]
is for the field name and [1] is the description and
[...]), I've come up with an idea that John had once
mentionned to me. Make use of nested custom tag.

<CF_CheckForm_FORM name="..." method="..." ...>
<CF_CheckForm_INPUT name="..." .../>
...
</CF_CheckForm_FORM>

When the page is processed and get to CF_CheckForm_FORM
it would check for a validation="yes" attribute. If it
finds one then it creates a javascript function to
validate this form. It would also initialize arrays
of structures for all the validation methods.

When it executes a form field type tag such as
CF_CheckForm_INPUT it would store the tag's attribute
into the appropriate array/structure.

When the end tag for the custom tag form is executed
it would output all the relevant information (arrays
into the javascript validation method for that form)
into the javascript section of the page head tag.

Discussion


Log in to post a comment.