ZervWizard is a class for handling multi-page forms, loads & validates values, and controls all the navigation between pages. Exactly the missing piece of the puzzle which I was needing.
The example script instantiates a class which extends the ZervWizard class. In the example, all the HTML is a part of the initial calling script. That's fine when you are only working with three pages and there are just a few fields per page ... my application has 13 forms (steps) with dynamic selection of forms and some event-specific forms that get plugged in on the fly. NOT AT ALL practical to think I can put everything in the calling script, or even contain those forms within functions that are included prior to instantiating the class.
I tried to substitute an include(form.html) statement rather than having the code in the actual 'calling' script. The forms all need default values and when I refer to those values, I get Notice: Undefined property: referring to whatever I needed.
EXAMPLE
Script Name = Harry.php
In that script I have
Code: Select all
require_once('potter.class.php');
$potter = new Potter();
Code: Select all
require_once('ZervWizard.class.php');
class potter extends ZervWizard
{
function potter()
...
$this->wheel = 'round';
The example would do this RIGHT WITHIN HARRY.PHP:
Code: Select all
<html>Say stuff / get stuff</html>
<!-- No problem referencing value="<?=$potter->wheel ?>" here and getting 'round' as teh default value for that field. -->Code: Select all
include('form.html');Any thoughts on either why I can't 'see' the variables (even if I refer to them as class->name) OR what I can do to access the forms differently?
Thanks for whatever help you can offer!