Matze Posted November 26, 2019 Posted November 26, 2019 Hi, I'm trying to get the id of a specific, non empty Textarea field, but my code returns an error: // "Formattext01" = name of the textarea (ckeditor) field // code in template: echo $page->Formattext01 // returns the content as expected echo $page->Formattext01->id // Notice: Trying to get property of non-object in /Users/websites/testpage/site/templates/basic-page.php on line 1 I guess i overseen something? but what? thanks for help!
elabx Posted November 26, 2019 Posted November 26, 2019 Try: https://processwire.com/api/ref/page/get-field/ $page->getField('Formattext01')->id 3
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now