Use this-plugin property.

Output the hidden linked page ID field on the form.
Setup the current location object based on the data that is about to be written to the DB.
Added a bit more debugging to the location update page method.