if (is_null($formId)) {
// Use form id from form name
$formId = $formName;
- } // END - if
+ }
// Set form name
$helperInstance->setFormName($formName);
if ($this->ifGroupOpenedPreviously()) {
// Then automatically close it here
$this->addFormGroup();
- } // END - if
+ }
// Simply close it
$this->formOpened = false;
if (($this->formOpened === false) && ($this->formEnabled === true)) {
// Throw an exception
throw new FormClosedException (array($this, $fieldName), self::EXCEPTION_CLOSED_FORM);
- } // END - if
+ }
// Generate the content
$inputContent = sprintf('<input type="text" class="form-control" id="%s_%s_field" name="%s" value="%s" />',
if (($this->formOpened === false) && ($this->formEnabled === true)) {
// Throw an exception
throw new FormClosedException (array($this, $fieldName), self::EXCEPTION_CLOSED_FORM);
- } // END - if
+ }
// Generate the content
$inputContent = sprintf('<input type="password" class="form-control" id="%s_%s_field" name="%s" value="%s" />',
if (($this->formOpened === false) && ($this->formEnabled === true)) {
// Throw an exception
throw new FormClosedException (array($this, $fieldName), self::EXCEPTION_CLOSED_FORM);
- } // END - if
+ }
// Generate the content
$inputContent = sprintf('<input type="hidden" name="%s" value="%s" />',
if (($this->formOpened === false) && ($this->formEnabled === true)) {
// Throw an exception
throw new FormClosedException (array($this, $fieldName), self::EXCEPTION_CLOSED_FORM);
- } // END - if
+ }
// Set whether the check box is checked...
$checked = ($fieldChecked ? ' checked="checked"' : ' ');
if (($this->formOpened === false) && ($this->formEnabled === true)) {
// Throw an exception
throw new FormClosedException (array($this, 'reset'), self::EXCEPTION_CLOSED_FORM);
- } // END - if
+ }
// Generate the content
$inputContent = sprintf('<input type="reset" class="reset_button" id="%s_reset" value="%s" />',
if (($this->formOpened === false) && ($this->formEnabled === true)) {
// Throw an exception
throw new FormClosedException (array($this, 'submit'), self::EXCEPTION_CLOSED_FORM);
- } // END - if
+ }
// Generate the content
$inputContent = sprintf('<input type="submit" class="submit_button" id="%s_submit" name="%s_submit" value="%s" />',
if (($this->ifGroupOpenedPreviously() === false) && ($groupId === $this->getPreviousGroupId())) {
// Abort here silently
return false;
- } // END - if
+ }
// Initialize content with closing div by default
$content = " </div>\n</div><!-- Group - CLOSE //-->";
if ($this->ifSubGroupOpenedPreviously()) {
// Close it here
$this->addFormSubGroup();
- } // END - if
+ }
// Get previous group id
$prevGroupId = $this->getPreviousGroupId();
if ((!empty($groupId)) && ($groupId != $prevGroupId)) {
//* DEBUG: */ echo $groupId.'/'.$prevGroupId."<br />\n";
$this->addFormGroup($groupId, $groupText);
- } // END - if
+ }
}
}
if (($this->ifSubGroupOpenedPreviously() === false) && ($subGroupId == $this->getPreviousSubGroupId())) {
// Abort here silently
return false;
- } // END - if
+ }
// Initialize content with closing div by default
$content = " </div>\n</div><!-- Sub group- CLOSE //-->";
// All call it again if sub group name is not empty
if ((!empty($subGroupId)) && ($subGroupId != $prevSubGroupId)) {
$this->addFormSubGroup($subGroupId, $subGroupText);
- } // END - if
+ }
}
}
if (($this->formOpened === false) && ($this->formEnabled === true)) {
// Throw an exception
throw new FormClosedException (array($this, $fieldName), self::EXCEPTION_CLOSED_FORM);
- } // END - if
+ }
// Default is no title attribute
$titleAttribute = '';
if (!empty($fieldTitle)) {
// Create title attribute
$titleAttribute = sprintf(' title="%s" data-toggle="tooltip"', $fieldTitle);
- } // END - if
+ }
// Generate the content
$inputContent = sprintf('<label class="col-form-label" for="%s_%s_field"%s>
if (($this->formOpened === false) && ($this->formEnabled === true)) {
// Throw an exception
throw new FormClosedException (array($this, 'form_notes'), self::EXCEPTION_CLOSED_FORM);
- } // END - if
+ }
// Generate the content
$inputContent = sprintf(" <div id=\"form_note_%s\">
if (($this->formOpened === false) && ($this->formEnabled === true)) {
// Throw an exception
throw new FormClosedException (array($this, 'form_notes'), self::EXCEPTION_CLOSED_FORM);
- } // END - if
+ }
// Shall we close or open the sub group?
if (($this->ifSubGroupOpenedPreviously() === false) && ($this->getPreviousSubGroupId() !== $selectId)) {
$firstEntry = sprintf("<option value=\"invalid\" disabled=\"disabled\">%s</option>\n",
$firstEntry
);
- } // END - if
+ }
// Construct the opening select tag
$content = sprintf("<select class=\"select_box\" id=\"%s_%s\" name=\"%s\">\n%s",
if ($this->ifSubGroupOpenedPreviously() === false) {
// Then throw an exception here
throw new HelperNoPreviousOpenedSubGroupException(array($this, $content), self::EXCEPTION_NO_PREVIOUS_SUB_GROUP_OPENED);
- } // END - if
+ }
// Render the content
$content = sprintf("<option value=\"invalid\" class=\"suboption suboption_%s\" disabled=\"disabled\">%s</option>\n",
if ($this->ifSubGroupOpenedPreviously() === false) {
// Then throw an exception here
throw new HelperNoPreviousOpenedSubGroupException(array($this, $content), self::EXCEPTION_NO_PREVIOUS_SUB_GROUP_OPENED);
- } // END - if
+ }
// Render the content
$content = sprintf("<option value=\"%s\" class=\"option option_%s\">%s</option>\n",