I’ve posted the current state of the code for anyone that wants to peruse it.
h3. Changes from “Simon’s code”:http://simon.incutio.com/archive/2003/06/17/theHolyGrail
* Added code to make sure radio/checkbox/textarea/select fields retain their values
** Does not work with select boxes that allow you to select multiple values
* Added new tag: <hiddeninputs />. This prints out any @$_POST@ variables that do not already have fields in the form as hidden inputs.
* Made the class handle @hr@ tags correctly.
There may be others, but I’ve forgotten them ![]()
Next stage is to add validation rules to these new fields. With select fields and radio buttons things start to get _fun_ ![]()
“View the code”:http://peter.mapledesign.co.uk/quests/formprocessor/code/0.2
“Run the demo”:http://peter.mapledesign.co.uk/quests/formprocessor/code/0.2/Myformdemo.php
3 comments ↓
A quick look at the xml of the example, there must be a better way than this in every field
!
Surely? Email feedback welcome.
[error for="dob"] [strong
class="error"]![/strong][/error]
sorry…
Eventually there should be a way to define this once and have it appended to every field. Unfortunately I don’t have any free time at the moment, so I can’t implement it
or do more work on FormProcessor
Leave a Comment