Question about forms
Permalink
I'm trying to get a handle on how to create forms. Working with Zend I'm used to the processing being 1) a form object is created in the controller, 2) this object is passed to the view and rendered.
How do this work in C5? From my understanding from tinkering with it, it looks like all the markup is produced directly in the view with the use of the form helper:
view.php:
<form method="post" action ="<?= $myAction ?>">
<?php
print $form->text('name', '');
print $form->submit('submit', 'Send');
?>
</form>
Is this correct or am I totally missing the workflow here?
How do this work in C5? From my understanding from tinkering with it, it looks like all the markup is produced directly in the view with the use of the form helper:
view.php:
<form method="post" action ="<?= $myAction ?>">
<?php
print $form->text('name', '');
print $form->submit('submit', 'Send');
?>
</form>
Is this correct or am I totally missing the workflow here?
https://github.com/jordanlev/c5_custom_contact_form...
If you just want the form on a single_page instead of in a block, let me know and I can dig up some good sample code for that too.
-Jordan