diff --git a/templates/Products/add.php b/templates/Products/add.php index 08c3a0e..68f3a27 100644 --- a/templates/Products/add.php +++ b/templates/Products/add.php @@ -14,7 +14,7 @@
- Form->create($product) ?> + Form->create($product, ['id' => 'main-form']) ?>
element('Products/form'); ?> diff --git a/templates/element/Products/form.php b/templates/element/Products/form.php index 33274bf..c88c103 100644 --- a/templates/element/Products/form.php +++ b/templates/element/Products/form.php @@ -10,7 +10,6 @@

Basic Info

Form->hidden('form', ['value' => 'product']); echo $this->Form->control('name'); echo $this->Form->control('product_catalog_id', [ 'empty' => 'Select a Catalog', @@ -31,6 +30,7 @@ echo $this->Form->control('product_category_id', [ 'hx-get' => $this->Url->build([ 'controller' => 'ProductCategoryAttributes', 'action' => 'form', + '?' => ['form' => 'product'], 0 => $productCategory ? $productCategory->product_catalog_id : '', ]), 'hx-target' => '#product-attributes-container',