Fix issue with scope for autofilled values

This commit is contained in:
Flavio Copes 2017-05-12 14:40:51 +02:00
parent 228ac73ba8
commit 42ff556420
2 changed files with 3 additions and 2 deletions

View File

@ -6,6 +6,7 @@
* Move captcha over email [#45](https://github.com/getgrav/grav-plugin-comments/issues/45)
1. [](#bugfix)
* Fix comment form processing
* Fix issue with scope for autofilled values
# v1.2.6
## 01/09/2017

View File

@ -14,9 +14,9 @@
{% endif %}
{% if config.plugins.login.enabled and grav.user.authenticated %}
{% if field.name == 'name' %}
<input type="hidden" name="{{field.name}}" value="{{grav.user.fullname}}">
<input type="hidden" name="{{ (scope ~ field.name)|fieldName }}" value="{{grav.user.fullname}}">
{% elseif field.name == 'email' %}
<input type="hidden" name="{{field.name}}" value="{{grav.user.email}}">
<input type="hidden" name="{{ (scope ~ field.name)|fieldName }}" value="{{grav.user.email}}">
{% else %}
<div>
{% include "forms/fields/#{field.type}/#{field.type}.html.twig" %}