PHP Classes

File: examples/formcontroller/templates/example_form2.php

Recommend this page to a friend!
  Classes of Haseeb Ahmad Basil   PHP Skeleton Framework   examples/formcontroller/templates/example_form2.php   Download  
File: examples/formcontroller/templates/example_form2.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Skeleton Framework
Extensive Web application development framework
Author: By
Last change:
Date: 8 years ago
Size: 1,442 bytes
 

Contents

Class file image Download
<html>
<head>
<title></title>
<style>
.error {
    color: red;
    }
</style>
</head>
<body>

<form action="" method="post">
<input type="hidden" name="action" value="Form1">
<table>
    <tr>
      <td>Field 1 (Numbers only in range 1-10)</td>
      <td><?php $p1 = $form->getField('field1'); echo $p1->render(); ?></td>
      <td><span class="error"><?php echo implode(', ', $p1->error_msg); ?></span></td>
    </tr>
    <tr>
      <td>Field 2 (Must match Field 1)</td>
      <td><?php $p2 = $form->getField('field2'); echo $p2->render(); ?></td>
      <td><span class="error"><?php echo implode(', ', $p2->error_msg); ?></span></td>
    </tr>
    <tr>
      <td>Field 3 (Letters only min length 5)</td>
      <td><input type="text" name="field3" value="<?php $p3 = $form->getField('field3'); echo $p3->value; ?>"></td>
      <td><span class="error"><?php echo implode(', ', $p3->error_msg); ?></span></td>
    </tr>
    <tr>
      <td>Field 4 (Convert letters to uppercase)</td>
      <td><input type="text" name="field4" value="<?php $p4 = $form->getField('field4'); echo $p4->value; ?>"></td>
      <td><span class="error"><?php echo implode(', ', $p4->error_msg); ?></span></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td><input type="submit" name="submit" value="submit"></td>
    </tr>
  </table>
  </form>
    <a href="../">Return to Examples</a>
</body>
</html>