There is no built-in way to display the form in two columns, however you can split it into two "sections" and make it appear as two columns with CSS.
Here is an example from the PayPal module:
PHP Code:
namespace XLite\Module\CDev\Paypal\View\Model;
abstract class ASettings extends \XLite\View\Model\AModel
{
/**
* Form sections
*/
const SECTION_ACCOUNT = 'account';
const SECTION_ADDITIONAL = 'additional';
protected $schemaAccount = array(
// ...
'user' => array(
self::SCHEMA_CLASS => 'XLite\View\FormField\Input\Text',
self::SCHEMA_LABEL => 'User',
self::SCHEMA_HELP => 'PayPal recommends entering a User Login here instead of your Merchant Login',
self::SCHEMA_REQUIRED => true,
),
// ...
);
protected $schemaAdditional = array(
// ...
'mode' => array(
self::SCHEMA_CLASS => 'XLite\View\FormField\Select\TestLiveMode',
self::SCHEMA_LABEL => 'Test/Live mode',
self::SCHEMA_REQUIRED => false,
),
// ...
);
// ...
public function __construct(array $params = array(), array $sections = array())
{
$this->sections = $this->getSettingsSections() + $this->sections;
parent::__construct($params, $sections);
}
protected function getSettingsSections()
{
return array(
static::SECTION_ACCOUNT => 'Your account settings',
static::SECTION_ADDITIONAL => 'Additional settings',
);
}
// ...
}