<pre class="lang:php decode:true ">&lt;?php

namespace icreate\Bricks;

use GFAPI;

class FormBrick extends Brick {
	
	public function __construct( $group ) {
		parent::__construct( $group, 'Form', 'form' );
		
		$form_field = $this-&gt;add_field( 'Form', 'form', [ 'type' =&gt; 'select' ] );
		
		add_filter( 'acf/load_field/key=' . $form_field['key'], [ $this, 'populate_form_select' ] );
	}
	
	public function populate_form_select( $field ) {
		$field['choices'] = array();
		
		foreach ( GFAPI::get_forms() as $form ) {
			$field['choices'][ $form['id'] ] = $form['title'];
		}
		
		return $field;
	}
	
	protected function display() {
		$form = GFAPI::get_form( get_sub_field( 'form' ) );
		gravity_form( $form['id'], false, false, false, null, true );
	}
	
}
</pre>
&nbsp;