Skip to content

Commit

Permalink
Merge branch 'release/5.1.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Jan 24, 2022
2 parents a3b59e4 + be67d36 commit b6b8371
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 7 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
# v5.1.5
## 01/24/2022

1. [](#bugfix)
* Fixed case in selectize field where custom new entries would not be stored in non `multiple` lists

# v5.1.4
## 11/16/2021

1. [](#bugfix)
* Fixed buttons no longer rendered [#537](https://github.com/getgrav/grav-plugin-form/issues/537)
* Allow `select` field to customize `autocomplete` attribute

# v5.1.3
## 10/26/2021
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Grav Form Plugin

The **form plugin** for [Grav](http://github.com/getgrav/grav) adds the ability to create and use forms. This is currently used extensively by the **admin** and **login** plugins.
The **form plugin** for [Grav](https://github.com/getgrav/grav) adds the ability to create and use forms. This is currently used extensively by the **admin** and **login** plugins.

# Installation

Expand All @@ -22,7 +22,7 @@ enabled: true

The Learn site has two pages describing how to use the Form Plugin:
- [Forms](https://learn.getgrav.org/forms)
- [Add a contact form](http://learn.getgrav.org/forms/forms/example-form)
- [Add a contact form](https://learn.getgrav.org/forms/forms/example-form)

# Using email

Expand Down
2 changes: 1 addition & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Form
slug: form
type: plugin
version: 5.1.4
version: 5.1.5
description: Enables the forms handling
icon: check-square
author:
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{
"name": "Team Grav",
"email": "[email protected]",
"homepage": "http://getgrav.org",
"homepage": "https://getgrav.org",
"role": "Developer"
}
],
Expand Down
2 changes: 1 addition & 1 deletion templates/forms/fields/captcha/captcha.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,6 @@
</script>
<script src="https://www.google.com/recaptcha/api.js?onload=captchaOnloadCallback_{{ formName }}&render=explicit&hl={{ grav.language.language }}&theme={{ theme }} "
async defer></script>
<div class="g-recaptcha" id="g-recaptcha-{{ formName }}"></div>
<div class="g-recaptcha" id="g-recaptcha-{{ formName }}" data-theme="{{ theme }}"></div>
{% endif %}
{% endblock %}
6 changes: 4 additions & 2 deletions templates/forms/fields/select/select.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
{% if field.disabled or isDisabledToggleable %}disabled="disabled"{% endif %}
{% if field.tabindex %}tabindex="{{ field.tabindex }}"{% endif %}
{% if field.form %}form="{{ field.form }}"{% endif %}
{% if field.autocomplete is defined %}autocomplete="{{ field.autocomplete }}"{% endif %}
{% if field.key %}
data-key-observe="{{ (scope ~ field.name)|fieldName }}"
{% endif %}
Expand All @@ -31,8 +32,9 @@
{% if field.placeholder %}<option value="" disabled selected>{{ field.placeholder|t|raw }}</option>{% endif %}

{% set options = field.options %}
{% if field.selectize.create and field.multiple %}
{% set options = options|merge(value|default([]))|array_unique %}
{% if field.selectize.create and value %}
{% set custom_value = field.multiple ? value : { (value): value } %}
{% set options = options|merge(custom_value|default([]))|array_unique %}
{% endif %}

{% set value = value is iterable ? value : value|string %}
Expand Down

0 comments on commit b6b8371

Please sign in to comment.