Skip to content

Commit 51bcfd9

Browse files
authored
Merge pull request #195 from BoldGrid/issue-194
fixes #194 Array Key "name" doesnt exist for custom html field
2 parents 72aa7f2 + c827f61 commit 51bcfd9

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

includes/fields/class-field-html.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ public function __construct() {
2020
* @return void
2121
*/
2222
public function render( $field_settings, $form_id ) {
23+
/**
24+
* Ensure the field name is set. There have been cases where the name array key is not set.
25+
* Not sure why and we were unable to replicate without manually removing the key.
26+
* This is a failsafe to ensure the field name is set.
27+
*/
28+
if ( ! isset( $field_settings['name'] ) ) {
29+
$field_settings['name'] = 'custom_html';
30+
}
2331
$use_theme_css = isset( $form_settings['use_theme_css'] ) ? $form_settings['use_theme_css'] : 'wpuf-style';
2432
?>
2533
<li <?php $this->print_list_attributes( $field_settings ); ?>>

readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ weForms is the most beginner friendly and fastest WordPress contact form plugin
237237

238238
== Changelog ==
239239

240-
= Version 1.6.16 ( TBD ) =
240+
= Version 1.6.16 ( 12 December, 2022 ) =
241241
* **Fix:** Empty field entries ending form entries view script.
242242
* **Fix:** Missing html tag on textarea field.
243243

0 commit comments

Comments
 (0)