Skip to main content
Bumped by Community user
added 834 characters in body
Source Link

I'm trying to develop an expressionengine extension which uses "publish_form_entry_data" hook to change some default features such as customized datepicker , etc. problem is it works perfectly in the publish new entry form , but when I tried to edit my existing entries it redirect me to the publish new entry page , and won't get me to edit entry page with the entry values for editing! is there any other hooks for this purpose? or should I pass some info for editing existing entries?

here is the code for activating the extension :

function activate_extension() {
    $hooks = array(
        'publish_form_entry_data'   =>  'main',
        'update_multi_entries_start' =>  'main',
        'entry_submission_start'    =>  'dataProcess'
    );
    foreach($hooks as $hook => $method){
        $data = array(
            'class'    => __CLASS__,
            'method'   => $method,
            'hook'     => $hook,
            'priority' => 10,
            'version'  => $this->version,
            'enabled'  => 'y'
        );
        $this->EE->db->insert('extensions', $data);
    }

}

and here is the method for the publish_form_entry_data hook :

function main(){
    $this->persianDatePicker();
}

I'm trying to develop an expressionengine extension which uses "publish_form_entry_data" hook to change some default features such as customized datepicker , etc. problem is it works perfectly in the publish new entry form , but when I tried to edit my existing entries it redirect me to the publish new entry page , and won't get me to edit entry page with the entry values for editing! is there any other hooks for this purpose? or should I pass some info for editing existing entries?

I'm trying to develop an expressionengine extension which uses "publish_form_entry_data" hook to change some default features such as customized datepicker , etc. problem is it works perfectly in the publish new entry form , but when I tried to edit my existing entries it redirect me to the publish new entry page , and won't get me to edit entry page with the entry values for editing! is there any other hooks for this purpose? or should I pass some info for editing existing entries?

here is the code for activating the extension :

function activate_extension() {
    $hooks = array(
        'publish_form_entry_data'   =>  'main',
        'update_multi_entries_start' =>  'main',
        'entry_submission_start'    =>  'dataProcess'
    );
    foreach($hooks as $hook => $method){
        $data = array(
            'class'    => __CLASS__,
            'method'   => $method,
            'hook'     => $hook,
            'priority' => 10,
            'version'  => $this->version,
            'enabled'  => 'y'
        );
        $this->EE->db->insert('extensions', $data);
    }

}

and here is the method for the publish_form_entry_data hook :

function main(){
    $this->persianDatePicker();
}
Source Link

problem with publish_form_entry_data expressionengine hook

I'm trying to develop an expressionengine extension which uses "publish_form_entry_data" hook to change some default features such as customized datepicker , etc. problem is it works perfectly in the publish new entry form , but when I tried to edit my existing entries it redirect me to the publish new entry page , and won't get me to edit entry page with the entry values for editing! is there any other hooks for this purpose? or should I pass some info for editing existing entries?