Form & Interactive Container


Form component is container that provides interactive functionality for it's ancestors. Actually any interactive component or control should be ancestor of the Form container otherwise it's interactive features won't be available.

It is similar to HTML Form element but unlike it Form containers can be nested. You can use more Form elements in the one view to customize it's interactivity or it's tab order and cycle. It dispatches submit event (px\containers\FormEvent::FORM_SUBMITED) when form is submitted.

Interactive Container

Interactive Container is container that acts like a Button. Unlike Button control it can contain other components as children. It dispatches event click when the container is clicked. It displays the hand cursor when mouse rolls over it.

Interactive Container


Example source code

Source code of the exmaple above.

<?xml version="1.0" encoding="UTF-8"?>
<px:Component xmlns:h=""
	<px:Form submit="{$self->message->rendered=true}">
		<px:InteractiveContainer backgroundColor="#ccc" width="100%">
			<h:img src="assets/32/error.png" alt="Error" float="left"/>
			<h:h4>You have unsaved changes.</h:h4>
			<h:p>There are changes to the document. To save them you have to
			click this message.</h:p>
	<h:span name="message" rendered="false">Changes saved!</h:span>