general_field('password', $values, $name, $label, $attrs);
}
+function textarea($values, $name, $label, $attrs=[]) {
+ if (!array_key_exists('rows', $attrs)) $attrs['rows'] = '6';
+ if (!array_key_exists('cols', $attrs)) $attrs['cols'] = '50';
+
+ $value = get_sent_field_value($values, $name);
+ $id = get_field_id($name);?>
+
+ <div class="field textual-input<?php esc(array_key_exists('required', $attrs) ? ' required'
+ : '');?>"><?php
+ field_label($name, $label);?>
+
+ <textarea name="<?php esc($name);?>" id="<?php esc($id);?>" <?php
+ print_attrs($attrs);?>><?php
+ esc($value);
+ ?></textarea>
+ </div><?php
+}
+
+function checkbox_field($values, $name, $label, $attrs=[]) {
+ $checked = get_sent_field_value($values, $name);
+ if ($checked) $attrs['checked'] = '';
+
+ $id = get_field_id($name);?>
+
+ <div class="field">
+ <input type="checkbox" name="<?php esc($name);?>" id="<?php esc($name);?>"
+ value="1" <?php print_attrs($attrs);?> /><?php
+
+ field_label($name, $label);?>
+ </div><?php
+}
+
function hidden_field($name, $value) {
general_bare_field('hidden', [$name=>$value], $name);
}