Closed Erisbv-zz closed 6 years ago
public function input($type, $name, $label = null, $value = null, array $options = []) { $label = $this->getLabelTitle($label, $name);
$optionsField = $this->getFieldOptions(array_except($options, ['suffix', 'prefix']), $name);
$inputElement = '';
/* ---------- */
if (!isset($options['placeholder'])) {
$label_name = is_array($label)? $label['html'] : $label;
$optionsField['placeholder'] = preg_replace('/[^A-Za-z0-9\-]/', '', strip_tags($label_name));
}`
/ ---------- /
I don’t understand what this code does. Can’t you already pass a placeholder as an option and have it applied to the input?
Please provide a PR with a clearer description of the feature and I’ll be more than happy to review it.
Add automatic placeholde in the input field within the input method