Matze Posted November 26, 2019 Share 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! Link to comment Share on other sites More sharing options...
elabx Posted November 26, 2019 Share Posted November 26, 2019 Try: https://processwire.com/api/ref/page/get-field/ $page->getField('Formattext01')->id 3 Link to comment Share on other sites More sharing options...
Matze Posted November 27, 2019 Author Share Posted November 27, 2019 Yes, that worked! Thank you! ? Link to comment Share on other sites More sharing options...
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