Get the current entry element in the CP (edit entry view)? You can listen to entries.onSaveEntry or entries.onDeleteEntry events and then get or modify
the entry via $event-&gt;params['entry'];.

But how would I get the entry element and its properties in the event that a user starts editing
an entry in the CP? I don't (necessarily) need to modify them, simple access is ok.

As far as I can see, there's no event available for this. And if I understand correctly,
only P&amp;T can add such an entries.onBeforeCpEditEntry
event (which would probably go into Entries Controller actionEditEntry function).

If you do entry edits using front-end forms this is easy, but not so from within the CP it seems.
Is there anything I overlooked, or is this simply not possible and maybe worth a feature request?

-

This question is related to this one: "How to reference the current entry element in custom Control Panel templates?"
but it's not quite the same. The solutions / workarounds I posted below have some drawbacks, so I'm still looking for a better solution!
I've been able to modify the entry editing form by creating a plugin that will include some javascript into CP layout. Then with javascript, I use some checks to make sure that I'm in the right place before doing any adjustments.

For example, in the following code, I checked if I'm editing an entry within section 32, then the label of postDate field will be changed, and also the expiryDate field will be hidden.

public function init()
{

    if (craft()-&gt;request-&gt;isCpRequest())
    {
        $postDateLabel = JsonHelper::encode(Craft::t('Issue Date'));

        $js = &lt;&lt;&lt;EOT

if (document.getElementById('entry-form')) {
    \$(function() {
        if ( \$('input[name="sectionId"]').val() == 32 ) {
            \$('#postDate-field label').html($postDateLabel);
            \$('#expiryDate-field').addClass('hidden');
        }
    });
}

EOT;

        craft()-&gt;templates-&gt;includeJs($js);

    }

}


Hope that is what you're looking for.