Location: PHPKode > projects > PHPfaces - User Interface Framework > demo/getting_started/getstarted.php
<?php
	/* (c) 2005-2006 by Tim Taubert (ttmails[at]users.sf.net) */
	
	require_once('../../core/PHPfaces.class.php');
	require_once('getstarted_events.php');
	
	$combo_event = new on_country_change();
	$btn_event   = new on_submit();
	
	$ui   = new PHPfaces();
	$form = new PForm("getstarted_form");
	
	$firstname = new PTextField("firstname");
	$form->assign($firstname);
	
	$name = new PTextField("name");
	$form->assign($name);
	
	$email = new PTextField("email");
	$form->assign($email);
	
	$country = new PComboBox("country");
	$form->assign($country);
	
	$store = new PComboBox("store");
	$form->assign($store);

	$emailbtn = new PButton("emailbtn","Send e-mail");
	$form->assign($emailbtn);

	$country->importOptions(
		array(
			"Germany"	=> "ger",
			"England"	=> "eng",
			"USA"		=> "us"
		)
	);
	$country->addEvent($combo_event);

	$combo_event->selectionChanged($ui,$form,$country,0);

	$emailbtn->addEvent($btn_event);
?>

<html>
	<head>
		<title>PHPfaces Testsite</title>

		<?php $ui->displayHeader(); ?>

	</head>
	
	<body>

		<?php $form->displayForm(); ?>

	</body>
</html>
Return current item: PHPfaces - User Interface Framework