This repository has been archived by the owner on Jan 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support id param in options, issue #67
- Loading branch information
Showing
1 changed file
with
11 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -243,7 +243,17 @@ protected function buildDivOptions() | |
$divOptions['class'] = "{$divOptions['class']} {$this->widgetOptions['class']}"; | ||
} | ||
$divOptions['input-id'] = $this->getReCaptchaId(); | ||
$divOptions['form-id'] = (isset($this->field) && $this->field->form !== null) ? $this->field->form->id : ''; | ||
|
||
if ($this->field !== null && $this->field->form !== null) { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
dzandrey
|
||
if (!empty($this->field->form->options['id'])) { | ||
$divOptions['form-id'] = $this->field->form->options['id']; | ||
} else { | ||
$divOptions['form-id'] = $this->field->form->id; | ||
} | ||
} else { | ||
$divOptions['form-id'] = ''; | ||
} | ||
|
||
$divOptions['id'] = $this->getReCaptchaId() . '-recaptcha' . | ||
($divOptions['form-id'] ? ('-' . $divOptions['form-id']) : ''); | ||
|
||
|
Need to add property "field" to this Class.
error message:
Unknown Property – yii\base\UnknownPropertyException
Getting unknown property: himiklab\yii2\recaptcha\ReCaptcha::field