Deprecated: Non-static method FfGlobals::defineIfNotDefined() should not be called statically in /hermes/walnacweb05/walnacweb05ac/b2615/moo.bdinc/FORMfields/src/FfGlobals.php on line 71

Deprecated: Non-static method FfGlobals::defineIfNotDefined() should not be called statically in /hermes/walnacweb05/walnacweb05ac/b2615/moo.bdinc/FORMfields/src/FfGlobals.php on line 82

Deprecated: Non-static method FfGlobals::defineIfNotDefined() should not be called statically in /hermes/walnacweb05/walnacweb05ac/b2615/moo.bdinc/FORMfields/src/FfGlobals.php on line 94

Deprecated: Non-static method FfGlobals::defineIfNotDefined() should not be called statically in /hermes/walnacweb05/walnacweb05ac/b2615/moo.bdinc/FORMfields/src/FfGlobals.php on line 101

Deprecated: Non-static method FfGlobals::existsAndIsNotBlank() should not be called statically in /hermes/walnacweb05/walnacweb05ac/b2615/moo.bdinc/FORMfields/src/FfPaths.php on line 19

Deprecated: Non-static method FfGlobals::existsAndIsNotBlank() should not be called statically in /hermes/walnacweb05/walnacweb05ac/b2615/moo.bdinc/FORMfields/src/FfPaths.php on line 21

Deprecated: Non-static method FfGlobals::defineIfNotDefined() should not be called statically in /hermes/walnacweb05/walnacweb05ac/b2615/moo.bdinc/FORMfields/src/FfPaths.php on line 42

Deprecated: Non-static method FfGlobals::defineIfNotDefined() should not be called statically in /hermes/walnacweb05/walnacweb05ac/b2615/moo.bdinc/FORMfields/src/FfPaths.php on line 49

Deprecated: Non-static method FfGlobals::defineIfNotDefined() should not be called statically in /hermes/walnacweb05/walnacweb05ac/b2615/moo.bdinc/FORMfields/src/FfPaths.php on line 56

Deprecated: Non-static method FfGlobals::defineIfNotDefined() should not be called statically in /hermes/walnacweb05/walnacweb05ac/b2615/moo.bdinc/FORMfields/src/FfPaths.php on line 63

Deprecated: Non-static method FfGlobals::defineIfNotDefined() should not be called statically in /hermes/walnacweb05/walnacweb05ac/b2615/moo.bdinc/FORMfields/src/FfPaths.php on line 70

Deprecated: Non-static method FfGlobals::defineIfNotDefined() should not be called statically in /hermes/walnacweb05/walnacweb05ac/b2615/moo.bdinc/FORMfields/src/FfPaths.php on line 77

Deprecated: Non-static method FfGlobals::defineIfNotDefined() should not be called statically in /hermes/walnacweb05/walnacweb05ac/b2615/moo.bdinc/FORMfields/src/FfPaths.php on line 84

Deprecated: Non-static method FfGlobals::defineIfNotDefined() should not be called statically in /hermes/walnacweb05/walnacweb05ac/b2615/moo.bdinc/FORMfields/src/FfPaths.php on line 91

Deprecated: Non-static method FfGlobals::defineIfNotDefined() should not be called statically in /hermes/walnacweb05/walnacweb05ac/b2615/moo.bdinc/FORMfields/src/FfPaths.php on line 98

Deprecated: Non-static method FfGlobals::defineIfNotDefined() should not be called statically in /hermes/walnacweb05/walnacweb05ac/b2615/moo.bdinc/FORMfields/src/FfPaths.php on line 105

Deprecated: Non-static method FfGlobals::getVerbose() should not be called statically in /hermes/walnacweb05/walnacweb05ac/b2615/moo.bdinc/FORMfields/src/FfPaths.php on line 110

Deprecated: Non-static method FfGlobals::defineIfNotDefined() should not be called statically in /hermes/walnacweb05/walnacweb05ac/b2615/moo.bdinc/FORMfields/src/fields/FormField.php on line 57

Deprecated: Non-static method FfGlobals::defineIfNotDefined() should not be called statically in /hermes/walnacweb05/walnacweb05ac/b2615/moo.bdinc/FORMfields/src/fields/FormField.php on line 66

Deprecated: Non-static method FfGlobals::defineIfNotDefined() should not be called statically in /hermes/walnacweb05/walnacweb05ac/b2615/moo.bdinc/FORMfields/src/fields/FormField.php on line 75

Deprecated: Non-static method FfGlobals::defineIfNotDefined() should not be called statically in /hermes/walnacweb05/walnacweb05ac/b2615/moo.bdinc/FORMfields/src/fields/FormField.php on line 88
checkboxes[$boxName] = new CheckboxField($boxName, $option); $this->addSubField($this->checkboxes[$boxName]); $i++; } $this->otherChoice = new TextField($name . FF_SEP . "other", FfLH::t("Other") . ":", FORM_FIELD_NOT_REQUIRED, 40, 1, null); $this->otherBox = new CheckboxField($name . FF_SEP . "other_box", FfLH::t("Other") . ":"); $this->otherBox->setExtraHtml("onclick=\"otherChoice=document.getElementById('" . $this->otherChoice->getId() . "');if(!this.checked)otherChoice.value='';\""); $this->otherChoice->setExtraHtml("onclick=\"otherBox=document.getElementById('" . $this->otherBox->getId() . "');otherBox.checked=true;\" onkeydown=\"otherBox=document.getElementById('" . $this->otherBox->getId() . "');if(this.value.length>0)otherBox.checked=true;\""); $this->addSubField($this->otherChoice); $this->addSubField($this->otherBox); $this->cols = $cols; if ($rows != null) $this->rows = $rows; else $this->rows = sizeof($this->checkboxes); $this->includeOtherChoice = $includeOtherChoice; } /** * Creates a new CheckboxGroupField. * @param string name the name of the form field. This value must not be a SQL reserved word and should follow all the standard variable naming conventions in PHP. * @param string label this form field's label. The label is the printable text that is typically displayed on the left side of the field. * @param int required Sets whether the field must be filled in and whether it looks like it must be filled in: FORM_FIELD_REQUIRED, FORM_FIELD_NOT_REQUIRED, FORM_FIELD_LOOKS_REQUIRED or FORM_FIELD_REQUIRED_NO_LOOK * @param array options A string array of options associated with each checkbox * @param int rows The number of rows used to display the radio button choices or if null is supplied each button will appear on it's own line. The rows restriction is ranked higher than the cols restriction. * @param int cols The number of columns used to display the radio button choices. Defaulted to 1. * @param boolean includeOtherChoice True if the other field should be displayed so that the user can enter an other string when their desired selection doesn't exist * @see FORM_FIELD_REQUIRED * @see FORM_FIELD_NOT_REQUIRED * @see FORM_FIELD_LOOKS_REQUIRED * @see FORM_FIELD_REQUIRED_NO_LOOK * @since FORMfields v1.0 * @deprecated deprecated as this constructor syntax is not expected in PHP 5 - will be removed once PHP 5 becomes a minimum requirement for FORMfields */ function CheckboxGroupField($name, $label, $required, $options, $rows=null, $cols=1, $includeOtherChoice=false) { $this->__construct($name, $label, $required, $options, $rows, $cols, $includeOtherChoice); } /** * Returns the HTML to display a single checkbox. * @param CheckboxField checkbox a checkbox to display * @return the HTML to display a single checkbox * @since FORMfields v3.0 */ function getSingleCheckboxTag($checkbox) { return $checkbox->getEditableFieldTag() . ""; } /** * Returns the HTML used to display the input portion of this * field. * @return string the HTML used to display the input portion of this field * @since FORMfields v3.0 */ function getEditableFieldTag() { $html = ""; $choices = array(); foreach ($this->checkboxes as $i=>$checkbox) { $choices[$i] = $this->getSingleCheckboxTag($checkbox); } $ts = new TableSet(null, "ffTableSetClear"); $ts->loadRowsAndColumns($choices, $this->rows, $this->cols); if ($this->includeOtherChoice) { $ts->addRow(array("
" . $this->getSingleCheckboxTag($this->otherBox) . " " . $this->otherChoice->getFieldTag() . "
")); } $html .= $ts->getTableTag(); return $html; } /** * Returns the value of this form field. * @return array a string array of options * @since FORMfields v3.0 */ function getValue() { $value = array(); foreach($this->checkboxes as $checkbox) { if (!$checkbox->isEmpty()) { array_push($value, $checkbox->getLabel()); } } if ($this->otherBox->getValue() && $this->otherChoice->getValue()) { array_push($value, $this->otherChoice->getValue()); } return $value; } /** * Sets the value of this field. * @param array values an array of strings equal to the selected options * @since FORMfields v3.0 */ function setValue($values) { parent::setValue($values); if (is_array($values)) { $this->clearValue(); foreach ($values as $value) { $match = false; foreach ($this->checkboxes as $i=>$checkbox) { if ($checkbox->getLabel() === $value) { $this->checkboxes[$i]->setValue("true"); $match = true; break; } } // If there wasn't a match then we assume it is the other value if ($this->includeOtherChoice && !$match && !$this->isBlank($value)) { $this->otherChoice->setValue($value); $this->otherBox->setValue("true"); //$this->otherChoice->setEnabled(true); } } } } /** * Sets the database value of this field. A database * value can be different than the field's actual value. For * example a phone number may have the value * "973-746-3233" but its database value would be "9737463233" * @param string value a comma separated list of values that is comma escaped * @since FORMfields v3.0 */ function setDbValue($value) { $this->setValue(FfHelper::stringToArray($value)); } /** * Retrieves the posted field value. In other words, sets this * field value using the appropriate values in $_REQUEST. * @since FORMfields v3.0 */ function getParameter() { parent::getParameter(); } /** * Checks for field errors detected by this field, including * a check for blank. This method ensures that if the other * choice is checked, that a value for other is supplied. * If an error is detected, the setError() method is called * to set the appropriate error message. * @return boolean true if there is an error or false otherwise * @since FORMfields v3.0 */ function isValid() { if (!parent::isValid()) return false; if ($this->isEmpty() && $this->otherBox->isEmpty()) return true; if ($this->includeOtherChoice && !$this->otherBox->isEmpty() && $this->otherChoice->isEmpty()) { $this->setError(FfLH::t("please specify a value for other") . "!"); return false; } return true; } } ?>
Warning: Declaration of DescriptionField::getDisplayFieldTag() should be compatible with FormField::getDisplayFieldTag($displayHelp = false) in /hermes/walnacweb05/walnacweb05ac/b2615/moo.bdinc/FORMfields/src/fields/DescriptionField.php on line 57

Warning: Declaration of SubmitField::getDisplayFieldTag() should be compatible with FormField::getDisplayFieldTag($displayHelp = false) in /hermes/walnacweb05/walnacweb05ac/b2615/moo.bdinc/FORMfields/src/fields/SubmitField.php on line 98

Warning: Declaration of ImageField::getEditableFieldTag() should be compatible with SubmitField::getEditableFieldTag($printId = true) in /hermes/walnacweb05/walnacweb05ac/b2615/moo.bdinc/FORMfields/src/fields/ImageField.php on line 54
FORMfields - Examples FORMfields, the premiere web framework.
Deprecated: Non-static method FfMenuHelper::getSectionHeader() should not be called statically in /hermes/walnacweb05/walnacweb05ac/b2615/moo.bdinc/FORMfields/examples/index.php on line 30

Deprecated: Non-static method FfMenuHelper::getTitle() should not be called statically in /hermes/walnacweb05/walnacweb05ac/b2615/moo.bdinc/FORMfields/examples/index.php on line 31

Deprecated: Non-static method FfMenuHelper::getSectionHeader() should not be called statically in /hermes/walnacweb05/walnacweb05ac/b2615/moo.bdinc/FORMfields/src/FfMenuHelper.php on line 599

Deprecated: Non-static method FfMenuHelper::getSectionFooter() should not be called statically in /hermes/walnacweb05/walnacweb05ac/b2615/moo.bdinc/FORMfields/src/FfMenuHelper.php on line 601
FORMfields - Examples

Deprecated: Non-static method FfMessageHelper::getInfoMessage() should not be called statically in /hermes/walnacweb05/walnacweb05ac/b2615/moo.bdinc/FORMfields/examples/index.php on line 32

Deprecated: Non-static method FfMenuHelper::getSectionHeader() should not be called statically in /hermes/walnacweb05/walnacweb05ac/b2615/moo.bdinc/FORMfields/src/FfMessageHelper.php on line 92

Deprecated: Non-static method FfMenuHelper::getSectionFooter() should not be called statically in /hermes/walnacweb05/walnacweb05ac/b2615/moo.bdinc/FORMfields/src/FfMessageHelper.php on line 114
Info
Here is a brief list of examples already on your website. If you have not already done so, you will have to run the appropriate database scripts to setup the database for each example. This can be done by browsing the examples directory.

Examples:

  • Path Examples:
    • Contact Us 1 - Demonstrates how to use an absolute path with a FORMfields form, the default path configuration.
    • Contact Us 2 - Demonstrates how to use a relative path with a FORMfields form.
  • All Fields:
    • All Fields - This form contains all the fields that can be generated by FORMgen.
    • All Fields Disable - Demonstrates how to dynamically disable/enable fields.
    • All Fields Tracked Update - Demonstrates how to store an audit trail in your database of all the changes made to a form's data.
  • CSS:
    • Formatting Example - Demonstrates how to apply CSS to change the look and feel of your form.
  • CSV Export/Import:
    • CSV Import - Demonstrates how to import CSV (Comma Separated Value) files.
    • CSV Export - Demonstrates how to export CSV files.
  • Email:
    • Ban Emails - Demonstrates how to deny a form submission based on a banned email address.
    • Contact With Route - Demonstrates how to route a form submission email based on the form's subject.
    • Email a Friend - Demonstrates how to create a system for emailing any page to a friend.
    • Mailer 1 - Emailing disabled by default for security reasons. Demonstrates how to blast email multiple addresses using a refreshing page.
    • Mailer 2 - Emailing disabled by default for security reasons. Demonstrates how to blast email users in a database using a refreshing page.
  • Search Results:
  • Field Calculations:
  • JavaScript:
    • Conditional Field - Uses JavaScript to hide/show fields based on a clicking a checkbox.
    • Close on Submit 1 - Only works with IE or when this form is opened in a new window. Closes the window after the user submits the form.
    • Close on Submit 2 - Only works with IE or when this form is opened in a new window. Provides a link to close the window after the user submits the form.
    • Frames Example - Uses JavaScript to break out of the frames once the form is submitted.
  • Languages:
    • Chinese Form - Demonstrates how to use UTF-8 encoding to create FORMfields forms in any language.
  • Menus:
    • Menu Helper 1 - Demonstrates both a horizontal and vertical menu constructed dynamically using arrays. Uses the blueMidnight CSS template.
    • Menu Helper 2 - Demonstrates both a horizontal and vertical menu constructed dynamically using arrays. Uses the blueSteel CSS template.
    • Menu Helper 3 - Demonstrates a vertical menu constructed dynamically using arrays. Uses the blueGray CSS template.
  • Messages:
    • Message Dialogs - Demonstrates how to create different types of message dialogs for uniform looking messages and question boxes.
  • Misc:
  • PayPal:
    • Buy Pixels - Demonstrates how to use PayPal to bill a user for a product such as pixels.
  • Searching:
  • Surveys:
  • TableSet:
    • Add Column - Demonstrates how to use TableSet to display and manipulate arrays of data.
  • User Convenience:
  • Utils:
    • List Formatter - Formats a list of entries in a list that can be used in PHP code.
    • CSV Merger - This example is disabled by default for security reasons. Merges data from multiple CSV files into a single CSV file.
  • Validation:
    • Validators - Demonstrates how to use FORMfields validators to dynamically associate external validation and processing logic to any FORMfields form.

Deprecated: Non-static method FfMenuHelper::getSectionFooter() should not be called statically in /hermes/walnacweb05/walnacweb05ac/b2615/moo.bdinc/FORMfields/examples/index.php on line 160
Copyright © 2005-2007 Brain Book Software LLC.
Built with FORMfields, the premiere web framework.