mirror of
https://github.com/a2nt/cms-niceties.git
synced 2024-10-22 11:05:46 +02:00
IMPR: Allow to hide placeholders
This commit is contained in:
parent
f37d4b2e92
commit
8b840d16a5
@ -28,10 +28,12 @@ class PlaceholderFormExtension extends Extension
|
||||
if (!$field->getAttribute('placeholder')) {
|
||||
$placeholder = $field->Title() .($field->hasClass('requiredField') ? '*' : '');
|
||||
|
||||
$field->setAttribute(
|
||||
'placeholder',
|
||||
$placeholder
|
||||
);
|
||||
if (!Config::inst()->get(\get_class($this->owner), 'no_placeholders')) {
|
||||
$field->setAttribute(
|
||||
'placeholder',
|
||||
$placeholder
|
||||
);
|
||||
}
|
||||
|
||||
/*
|
||||
* SilverStripe\UserForms\Form\UserForm:
|
||||
|
Loading…
Reference in New Issue
Block a user