Hi
How am I supposed to render form? The plugin page doesn't cover this and has only a overly simplified example.
For example which class I need to include in template.php to get $imforms variable to use for query and rendering a form?
If I follow the plugin page's direction it will crash on imforms not defined.
EDIT: Answering to myself and stating that the documentation is lacking this whole Factory thing.
How am I supposed to render form? The plugin page doesn't cover this and has only a overly simplified example.
For example which class I need to include in template.php to get $imforms variable to use for query and rendering a form?
If I follow the plugin page's direction it will crash on imforms not defined.
EDIT: Answering to myself and stating that the documentation is lacking this whole Factory thing.
PHP Code:
<?php $imforms = new ImForms\Factory(); ?>
<?php $imforms_processor = $imforms->getProcessor(); ?>
<?php $imforms_controller = new ImForms\Controller($imforms_processor); ?>
<?php $imforms->setController($imforms_controller); ?>
<?php $form = $imforms_processor->getFormByName('contact'); ?>