Jump to content

Module: how to differentiate form's


jondm

Recommended Posts

Hi,

 

I have done a form to add information for my module, but know, i don't know how i can't differentiate between add form and edit form.

 

Someone can help me? And how i can get data to fill the form in the edit mode?

 

Thanks everyone for the help! :)

Link to comment
Share on other sites

Hi,

 

my field_list is the next one in the ModuleAdminController:

$this->fields_list = array(
            'id_supplier_bill' => array('title' => $this->l('ID'), 'align' => 'center', 'class' => 'fixed-width-xs'),
            'id_product_supplier' => array('title' => $this->l('ID Supplier'), 'align' => 'center', 'class' => 'fixed-width-xs'),
            'product_supplier_name' => array('title' => $this->l('Supplier'), 'align' => 'center'),
            'serie' => array('title' => $this->l('Serie'), 'align' => 'center'),
            'date' => array('title' => $this->l('Date'),'filter_key' => 'a!date', 'align' => 'center', 'type' => 'date'),
            'status' => array('title' => $this->l('Status'), 'class' => 'fixed-width-xs', 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'orderby' => FALSE),
            'total' => array('title' => $this->l('Total'), 'align' => 'center')
        );

This is the main data, but i have more data to get. I was trying to pass using querys in renderForm and using tpl_view_vars, but i can't access to this data from the template inside the {block name="other_fieldsets"}.

 

Maybe I can try accessing to the data using an ajax petition to get data?

 

 

Thanks for your answer.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...