0

I am in the process of updating a very old EE 2 site to EE 5. It is using EE membership management addon. I am running into an issue where the core membership files had been altered to help customize things. Here is one example.

in mod.member_settings.php the existing code for loading a edit_profile_form has been altered as below.

return  $this->_var_swap(
            $this->_load_element('edit_profile_form'),
            array(
                'form_declaration' => ee()->functions->form_declaration(
                    array('action' =>
                          $this->_member_path('update_profile'), 
                          'class' => 'form-horizontal', 
                          'id' => 'edit_profile_form')
                )
            )
);

It is simply adding a class and id to the form when the edit_profile_form.html page calls {form_declaration}. When I upgraded it overwrote mod.member_settings.php file with the latest so now that code looks like this.

return  $this->_var_swap(
            $this->_load_element('edit_profile_form'),
            array(
                'form_declaration' => ee()->functions->form_declaration(
                    array('action' => $this->_member_path('update_profile'))
                ),
                'path:update_profile'   => $this->_member_path('update_profile'),
                'custom_profile_fields' => $r
            )

I would like to know if there is a way to alter things in edit_profile_form.html and other member theme files so that when we do future upgrades we don't lose functionality or look and feel as we are currently doing. I have figured I can write some javascript/jquery to add id's, classes, etc but this doesn't seem like best practice.

I know I can call something like this ee()->functions->form_declaration($form_details); where $form_details has the array of data I need but I am not able to from the template as I can't figure out a way to have the member html files allow php.

Any advice would be appreciated on best practice so moving forward we are not altering core files that may get overwriting in the future. );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.