Location: PHPKode > projects > Enzyme: PHP profile/object community mgr > Enzyme-0.6.3/main/edit/new_referrer.inc
<!-- Include file new_referrer.inc -->
<?

    require( "oohforms.inc" );         // include the library

    $f = new form;                   // create a form object

    $f->add_element( array( "type" => "text", 
			    "name" => "referrer_name", 
			    "size" => "35" ) ); // set up form elements
    $f->add_element( array( "type" => "doSelectNoText",
			    "name" => "referrer_schoolid",
			    "table" => "school" ) );
    $referrer_count = 0; // for load_defaults
    $f->add_element( array( "type" => "hidden",
			    "name" => "referrer_count",
			    "value" => 0 ) ); //value => 0 in case of no load_defaults.

    if( !isset( $confirm ) )
       $f->add_element( array( "type" => "submit", "name" => "confirm" ) );
    else
    {
       $f->add_element( array( "type" => "submit", "name" => "isEdit" ) );
       $f->add_element( array( "type" => "submit", "name" => "cancel", "extrahtml" => "onClick=\"window.close()\"" ) );
       $f->add_element( array( "type" => "submit", "name" => "final" ) );
       $f->freeze();
    }
    $f->load_defaults();
?>

<?
     $f->start( 'addReferrer', 'post', 'insert_item.php3?table=referrer' );
?>

	<table border="0" width="100%">
           <tr>
           <td colspan="2" cellpadding="2">
		<H3><? print( $heading ); ?></H3>
	   </td>
	   </tr>
	<tr>
		<td width="20%">
			Name of referrer (person or organization):
		</td>
		<td>
                      <? $f->show_element( 'referrer_name' ); ?>
                </td>
	</tr>
	<tr>
		<td colspan="2">
			<hr>
		</td>
	</tr>
	<tr>
		<td width="20%">
			School (if the school is not in this list, please add it on the Education page):
		</td>
		<td width="80">
                        <? $f->show_element( 'referrer_schoolid' ); ?>
		</td>
	</tr>
	<tr>
		<td colspan="2">
			<hr size="1">
		</td>
	</tr>
	<tr>
		<td>
                  <? if( !isset( $confirm ) )
                     {
                        $f->show_element( 'confirm', "Submit" );
                        $f->finish();
                     }
                     else
                     {
                        $f->show_element( 'isEdit', "Edit" );
                        $f->show_element( 'cancel', "Cancel" );
                        $f->show_element( 'final', "OK" );
                        $f->finish();
                     }
                  ?>
		</td>
	</tr>
</table>
</td>
<!-- End include file -->
Return current item: Enzyme: PHP profile/object community mgr