onionradish
-
Posts
2 -
Joined
-
Last visited
Community Answers
-
onionradish's post in Use Field Value or Placeholder Failing was marked as the answer
Thanks for the info -- I'd have never found it anywhere else. For reference to others, this is what worked:
_init.php
function text_or_placeholder($fieldname){ $text = wire('page')->get($fieldname); if (!$text){ $text = wire('fields')->get($fieldname)->placeholder; } return $text; } Is there somewhere I should have found it?