@mdowton (or anyone else) - in 3*, any idea how you'd go about it with the
TextField::create("Address", "Street Address")
style construction?
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
@mdowton (or anyone else) - in 3*, any idea how you'd go about it with the
TextField::create("Address", "Street Address")
style construction?
TextField::create("Address", "Street Address")
->setAttribute('placeholder', 'Enter your address')
Thanks martimiz - that worked perfectly!
Is it possible to set the placeholder text in the template rather than in the PHP code?
There is probably a way, but why would you need to do this? I am sure the php option is the conventional solution.
Best,
NovaWeb
Hey @mdowtown That worked for adding placeholders on the admin side as well, thanks much!
I agree with corry . it can also be enabled like his site.