src/HtmlGenerator.php
/**
     * Generates an textfield (not textarea) that can be submitted by hitting 
     * return/enter.
     * 
     * @param string label - the display text to put next to the input field.
     * @param string 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 string label - the display text to put next to the input field.
@param string 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 string label - the display text to put next to the input field . @param string 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 generateAjaxTextfield($fieldName,
                                                 $staticData   = array(),
                                                 $currentValue = "", 
                                                 $placeholder  = '',
                                                 $offscreenSubmit = true)
    {    
        $html = 
            "<form action='' onsubmit='ajaxPostForm(this, \"" . $fieldName . "\")'>" .
                self::generateHiddenInputFields($staticData) .
                self::generateInputField($fieldName, 'text', $currentValue, $placeholder) .
                self::generateSubmitButton('', $offscreenSubmit) .
            '</form>';
        return $html;
    }
public static function generateAjaxTextfield ( $ fieldName , $ staticData = array ( ) , $ currentValue = " " , $ placeholder = '' , $ offscreenSubmit = true ) { $ html = " <form action='' onsubmit='ajaxPostForm(this,  \" " . $ fieldName . " \" )'> " . self :: generateHiddenInputFields ( $ staticData ) . self :: generateInputField ( $ fieldName , 'text' , $ currentValue , $ placeholder ) . self :: generateSubmitButton ( '' , $ offscreenSubmit ) . '</form>' ; return $ html ; }
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 .