Skip to content

Commit db63fff

Browse files
committed
Resolve issue with getFrontEndInputHtml
1 parent 0d52aa8 commit db63fff

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
1111
## 1.0.10 - 2020-3-21
1212
### Added
1313
- Better formatting of tables
14+
15+
## 1.0.11 - 2020-11-7
16+
### Fixed
17+
- Resolve error with getFrontEndInputHtml that would cause a PHP compile error

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "mblode/sprout-forms-tables",
33
"description": "Tables Field for Sprout Forms",
44
"type": "craft-plugin",
5-
"version": "1.0.10",
5+
"version": "1.0.11",
66
"keywords": [
77
"craft",
88
"cms",

src/integrations/sproutforms/fields/Table.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use craft\base\PreviewableFieldInterface;
77
use yii\db\Schema;
88
use barrelstrength\sproutforms\base\FormField;
9+
use barrelstrength\sproutforms\elements\Entry;
910
/**
1011
* Class Table
1112
*
@@ -119,14 +120,15 @@ public function getExampleInputHtml(): string
119120
* @throws \Twig_Error_Loader
120121
* @throws \yii\base\Exception
121122
*/
122-
public function getFrontEndInputHtml($value, array $renderingOptions = null): \Twig_Markup
123+
public function getFrontEndInputHtml($value, Entry $entry, array $renderingOptions = null): \Twig_Markup
123124
{
124125
$rendered = Craft::$app->getView()->renderTemplate(
125126
'table/input',
126127
[
127128
'name' => $this->handle,
128129
'value' => $value,
129130
'field' => $this,
131+
'entry' => $entry,
130132
'renderingOptions' => $renderingOptions
131133
]
132134
);

0 commit comments

Comments
 (0)