summaryrefslogtreecommitdiff
path: root/includes/sys_form.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/sys_form.php')
-rw-r--r--includes/sys_form.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/includes/sys_form.php b/includes/sys_form.php
index 960be401..98ef2134 100644
--- a/includes/sys_form.php
+++ b/includes/sys_form.php
@@ -176,6 +176,23 @@ function form_text($name, $label, $value, $disabled = false) {
}
/**
+ * Renders a text input with placeholder instead of label.
+ *
+ * @param String $name
+ * Input name
+ * @param String $placeholder
+ * Placeholder
+ * @param String $value
+ * The value
+ * @param Boolean $disabled
+ * Is the field enabled?
+ */
+function form_text_placeholder($name, $placeholder, $value, $disabled = false) {
+ $disabled = $disabled ? ' disabled="disabled"' : '';
+ return form_element('', '<input class="form-control" id="form_' . $name . '" type="text" name="' . $name . '" value="' . htmlspecialchars($value) . '" placeholder="' . $placeholder . '" ' . $disabled . '/>');
+}
+
+/**
* Rendert ein Formular-Emailfeld
*/
function form_email($name, $label, $value, $disabled = false) {
@@ -199,6 +216,14 @@ function form_password($name, $label, $disabled = false) {
}
/**
+ * Renders a password input with placeholder instead of label.
+ */
+function form_password_placeholder($name, $placeholder, $disabled = false) {
+ $disabled = $disabled ? ' disabled="disabled"' : '';
+ return form_element('', '<input class="form-control" id="form_' . $name . '" type="password" name="' . $name . '" value="" placeholder="' . $placeholder . '" ' . $disabled . '/>', 'form_' . $name);
+}
+
+/**
* Rendert ein Formular-Textfeld
*/
function form_textarea($name, $label, $value, $disabled = false) {