static function renderField($type = "text", $name, $value = "", $title, $class = null, $placeholder = "", $w1 = 2, $w2 = 10, $width = "100%", $height = "400px") { if ($class == null) { $class = "form-control"; } $html = '<div class="form-group row">'; if ($type == "editor") { $html .= '<label class="control-label">' . $title . '</label>'; $html .= '<div class="">'; $html .= buildHtml::editors($name, $value, $width, $height); $html .= '</div>'; } else { $html .= '<label class="control-label col-md-' . $w1 . '">' . $title . '</label>'; $html .= '<div class="col-md-' . $w2 . '">'; if ($type == "text") { $html .= '<input placeholder="' . $placeholder . '" type="text" name="' . $name . '" class="' . $class . '" value="' . $value . '">'; } else { if ($type == "password") { $html .= '<input placeholder="' . $placeholder . '" type="password" name="' . $name . '" class="' . $class . '" value="' . $value . '">'; } else { if ($type == "textarea") { $html .= '<textarea rows="3" cols="20" name="' . $name . '" class="' . $class . '">' . $value . '</textarea>'; } else { if ($type == "label") { $html .= $value; } else { if ($type == "select") { $html .= $value; } else { if ($type == "calander") { $html .= ' <div class="input-group date"> ' . '<input placeholder="' . $placeholder . '" type="text" name="' . $name . '" class="' . $class . ' datepicker" value="' . $value . '"> ' . ' <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span> ' . '</div>'; } } } } } } $html .= '</div>'; } $html .= '</div>'; return $html; }