]> git.mxchange.org Git - shipsimu.git/blobdiff - inc/classes/main/helper/web/class_WebFormHelper.php
Re-added with access protection
[shipsimu.git] / inc / classes / main / helper / web / class_WebFormHelper.php
index c8c744835df2c35a49343321f7a7abbfacdce975..32d635a698f4a30add1dd2703b9c5293268fa9a1 100644 (file)
@@ -278,6 +278,21 @@ class WebFormHelper extends BaseHelper {
                $this->addContent($inputContent);
        }
 
+       /**
+        * Add a hidden input tag to the form with pre-loaded default value
+        *
+        * @param       $fieldName      Input field name
+        * @return      void
+        */
+       public function addInputHiddenFieldWithDefault ($fieldName) {
+               // Get the value from instance
+               $fieldValue = call_user_func_array(array($this->valueInstance, "getField"), array($fieldName));
+               //* DEBUG: */ echo __METHOD__.":".$fieldName."=".$fieldValue."<br />\n";
+
+               // Add the text field
+               $this->addInputHiddenField($fieldName, $fieldValue);
+       }
+
        /**
         * Add a checkbox input tag to the form or throw an exception if it is not
         * yet opened. The field's name will be set as id.