/** * A helper class to quickly set the size of the label part of an object, and the form control part of the object * for a particular device size. Bootstrap is divided into 12 columns, so whatever the label does not take is * left for the control. * * If the contrtol does not have a "Name", we will assume that the label will not be printed, so we will move the * control into the control side of things. * * @param $strDeviceSize * @param $intColumns */ public function SetHorizontalLabelColumnWidth($strDeviceSize, $intColumns) { $intCtrlCols = 12 - $intColumns; if ($this->Name) { // label next to control $this->AddLabelClass(Bootstrap::CreateColumnClass($strDeviceSize, $intColumns)); $this->AddHorizontalColumnClass($strDeviceSize, $intCtrlCols); } else { // no label, so shift control to other column $this->AddHorizontalColumnClass($strDeviceSize, 0, $intColumns); $this->AddHorizontalColumnClass($strDeviceSize, $intCtrlCols); } }