Edit customization doesn't work in subpanel quick create

Good morning,
I created a customization in editview but doesn’t work in quickcreate mode, into subpanel.
Can someone had my same problem?

Alternatively, how can I open the full form module when “create” button in subpanel is pressed?

B.

Hi,
what kind of customization do you want to do here? Have you seen the “QuickCreate” and “Subpanel” settings in the studio?

  1. QuickCreate: each time you create an account using the “create” button in a subpanel, this layout will be used
  2. Subpanel-subfolder: for each module, you can select the shown columns per subpanel within that module

In edit view, I have something line (in custom/module/myModule/metadata/editviewdefs.php)

'panels' => 
array (
  'default' => 
  array (
    0 => 
    array (
      0 => 
      array (
        'name' => 'name',
        'customCode' => '{$custom_name_code}',
      ),
      1 => 
   [....]
    ),
[....]
  ),
),

where $custom_name_code is defined in custom/modules/myModule/views/view.edit.php (below the file):

require_once('include/MVC/View/views/view.edit.php');

class myModuleViewEdit extends ViewEdit
{
public function __construct()
{
    parent::__construct();
}

public function display()
{
    // make sure it works in the subpanel too
    $this->useForSubpanel = true;
	$this->useModuleQuickCreateTemplate = true;

    // make the name value available in the tpl file
    $this->ss->assign('name_value', $this->bean->name);

    // load the parsed contents of the tpl into this var
    $name_input_code = $this->ss->fetch('custom/modules/myModule/tpls/unique_checker.tpl.js');

    // pass the parsed contents down into the editviewdefs
    $this->ss->assign('custom_name_code', $name_input_code);

    // definitely need to call the parent method
    parent::display();
}

}

image

where checkId() is a function that made some checks.

Now, this works for editview (In my custom module when I create a new record and also when I pressed “Full form” button into subpanel in related module (accounts in my case)
but, doesn’t work in quickcreate form.

I replaced the same code of custom/module/myModule/metadata/editviewdefs.php into in custom/module/myModule/metadata/quickcreatedefs.php

but I can’t see my field.

Goodmorning: can someone help me? OR How can I go to EditView full form after click on Create button from subpanel?

Thank you so much
B

You can open full form by changing subpanel button as follow,
Do the changes in following files:
custom/Extension/modules/Yourparentmodule/Ext/Layoutdefs/Anyname.php

$layout_defs["Yourparentmodule"]["subpanel_setup"]["subpanelname"]["top_buttons"] = 
array(
    array(
        'widget_class' => 'SubPanelTopCreateButton',
    ),
    array(
        'widget_class' => 'SubPanelTopSelectButton',
    ),
);

Do quick repair and rebuild.

2 Likes

Thank you so much, It works fine :slight_smile: