Jump to content

Module Customization - HelperForm Class Prestashop


Sandeep Tiwari

Recommended Posts

Hello Guys

I have an urgent issue , I have created two fields in my module Admin controller . Fields are customer and product records like in the screenshot ( http://awesomescreenshot.com/0ea5da9r86 ) they both are created from merging an  array of groupBox type group.

For example : 

 $this->fields_form['input'] = array_merge(
            $this->fields_form['input'],
            array(
                array(
                    'type' => 'group',
                    'label' => $this->l('Customer'),
                    'name' => 'groupBox',
                    'values' => $pgroups2,
                    'required' => true,
                    'col' => '6',
                    'hint' => $this->l('Select the member for Reserved events.')
                )
            )
        );
		
		 
        $this->fields_form['input'] = array_merge(
            $this->fields_form['input'],
            array(
                array(
                    'type' => 'group',
                    'label' => $this->l('Product'),
                    'name' => 'groupBox',
                    'values' => $pgroups,
                    'required' => true,
                    'col' => '6',
                    'hint' => $this->l('Select all the Product that you would like to apply to this event.')
                )
            )
        );

When I click submit , groupBox array comes like this :
 

[groupBox] => Array        (            [0] => 3            [1] => 4            [2] => 5            [3] => 6            [4] => 255            [5] => 404            [6] => 425            [7] => 384        )instead I need separate field for Product record. I changed the name parameter groupBox2 but no luck. Any idea how to get 2 different array for customer and product.Please help.Regards 
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...