In a view, can I declare a form object and make forms using it to create forms? Should it be a variable that you will send to the view?
<!DOCTYPE html>
<html lang="en">
<head>
<title><?php echo $title;?></title>
</head>
<body>
<div id="container">
hello world
<?php foreach($posts as $post):?>
<h2><?php echo $post['title'];?></h2>
<?php endforeach;?>
<?php
$form = new Form
$form->start('files');
$form->input('text','name','50');
$form->end();
?>
</body>
</html>
Instead of HTML code?
Don’t think it matters which MVC framework you are using. Your page controller should initialize the form object which is then passed to your view. Your view should only contain html and API calls via the form object (variable accessible by view).