src/HtmlGenerator.php
/**
     * Generates an textfield (not textarea) that can be submitted by hitting 
     * return/enter.
     * 
     * @param label - the display text to put next to the input field.
     * @param name - the name/id of the generated input field.
     * @param onSubmit - javascript string of what to run when the buttons 
     *                   onClick is activated.
     * @param value - an optional parameter of the default/current value to 
     *                stick in the input box.
     * 
     * @return stringString - the generated html to create this submittable row.
     */
Generates an textfield (not textarea) that can be submitted by hitting
return/enter.

@param label - the display text to put next to the input field.
@param name - the name/id of the generated input field.
@param onSubmit - javascript string of what to run when the buttons
onClick is activated.
@param value - an optional parameter of the default/current value to
stick in the input box.

@return stringString - the generated html to create this submittable row.
Generates an textfield ( not textarea ) that can be submitted by hitting return / enter . @param label - the display text to put next to the input field . @param name - the name / id of the generated input field . @param onSubmit - javascript string of what to run when the buttons onClick is activated . @param value - an optional parameter of the default / current value to stick in the input box . @return stringString - the generated html to create this submittable row .
public static function generateSubmittableTextfield($fieldName,
                                                        $postfields  = array(),
                                                        $value       = "", 
                                                        $placeholder = '', 
                                                        $formId      = '')
    {    
        if ($formId != '')
        {
            $formId = ' id="' . $formId . '" ';
        }
        $htmlString = 
            '<form method="POST" action="" ' . $formId . '>' .
                self::generateInputField($fieldName, 'text', $value, $placeholder) .
                self::generateHiddenInputFields($postfields) .
                self::generateSubmitButton('submit', $offscreen=true) .
            "</form>";
        return $htmlString;
    }
public static function generateSubmittableTextfield ( $ fieldName , $ postfields = array ( ) , $ value = " " , $ placeholder = '' , $ formId = '' ) { if ( $ formId != '' ) { $ formId = ' id="' . $ formId . '" ' ; } $ htmlString = '<form method="POST" action="" ' . $ formId . '>' . self :: generateInputField ( $ fieldName , 'text' , $ value , $ placeholder ) . self :: generateHiddenInputFields ( $ postfields ) . self :: generateSubmitButton ( 'submit' , $ offscreen = true ) . " </form> " ; return $ htmlString ; }
Generates an textfield (not textarea) that can be submitted by hitting
 return/enter.
Generates an textfield ( not textarea ) that can be submitted by hitting return / enter .