Display error message using a SKUID snippet, editor undefined

I want to display an error message with as below with a skuid snippet,

var $ = skuid.$;
var pageTitle = $(‘#PersonalDetailsForm’);
var editor = pageTitle.data(‘object’).editor;
var PersonalDetailsFormModel = skuid.model.getModel(‘PersonalDetailsForm’);
var PersonalDetailsForm = PersonalDetailsFormModel.getFirstRow();

if (PersonalDetailsForm.Asic_CountryOfBirth__c === ‘Australia’) {

            message: ‘Error message xyz’,
            severity: ‘ERROR’

    return false;

the “var editor = pageTitle.data(‘object’).editor;” sections gives an error message saying that
“Uncaught TypeError: Cannot read property ‘editor’ of undefined”

The wired thing here is that the same code snippet worked for some other pages in my system without an error.

Why am I getting this error in my second implementation, I have noticed that there is a model with the same name as the pageTitle “PersonalDetailsForm”,
Could this be an issue?

Appreciate your help

Are you sure that the ID defined for the page title component on your page is exactly  "PersonalDetailsForm "   Case sensitivity is key here. 

Rob, Thanks for the help, it was a silly mistake of mine, I’ve been referring to the “Page name” instead of Page Title -> Advance -> Unique Id.

Whew! Glad it was an easy fix.  

Rob i was also facing the same issue thaks for  posting your fix