diff --git a/Block/Adminhtml/Slider/Edit/Tab/Renderer/Snippet.php b/Block/Adminhtml/Slider/Edit/Tab/Renderer/Snippet.php
index 5baf2a8..581ef73 100644
--- a/Block/Adminhtml/Slider/Edit/Tab/Renderer/Snippet.php
+++ b/Block/Adminhtml/Slider/Edit/Tab/Renderer/Snippet.php
@@ -34,7 +34,7 @@ class Snippet extends AbstractElement
*/
public function getElementHtml()
{
- $sliderId = '1';
+ $sliderId = $this->getSliderId() ?? 1;
$html = '
- ';
$html .= __('Add Widget with name "Banner Slider widget" and set "Slider Id" for it.');
$html .= '
- ';
diff --git a/Block/Adminhtml/Slider/Edit/Tab/Slider.php b/Block/Adminhtml/Slider/Edit/Tab/Slider.php
index ecdf6ea..7f611a7 100644
--- a/Block/Adminhtml/Slider/Edit/Tab/Slider.php
+++ b/Block/Adminhtml/Slider/Edit/Tab/Slider.php
@@ -215,6 +215,7 @@ protected function _prepareForm()
'name' => 'snippet',
'label' => __('How to use'),
'title' => __('How to use'),
+ 'slider_id' => $slider->getId(),
]);
$form->addValues($slider->getData());