MW WP Form - Version 4.4.0

Version Description

  • Add filter hook mwform_form_start_attr_action.
  • Add maxlength attribute to textarea field arguments.
Download this release

Release Info

Developer inc2734
Plugin Icon wp plugin MW WP Form
Version 4.4.0
Comparing to
See all releases

Code changes from version 4.3.2 to 4.4.0

classes/form-fields/class.textarea.php CHANGED
@@ -41,6 +41,7 @@ class MW_WP_Form_Field_Textarea extends MW_WP_Form_Abstract_Form_Field {
41
  'name' => '',
42
  'id' => null,
43
  'class' => null,
 
44
  'cols' => 50,
45
  'rows' => 5,
46
  'value' => '',
@@ -65,6 +66,7 @@ class MW_WP_Form_Field_Textarea extends MW_WP_Form_Abstract_Form_Field {
65
  array(
66
  'id' => $this->atts['id'],
67
  'class' => $this->atts['class'],
 
68
  'cols' => $this->atts['cols'],
69
  'rows' => $this->atts['rows'],
70
  'value' => $value,
@@ -112,6 +114,11 @@ class MW_WP_Form_Field_Textarea extends MW_WP_Form_Abstract_Form_Field {
112
  <?php $class = $this->get_value_for_generator( 'class', $options ); ?>
113
  <input type="text" name="class" value="<?php echo esc_attr( $class ); ?>" />
114
  </p>
 
 
 
 
 
115
  <p>
116
  <strong>cols</strong>
117
  <?php $cols = $this->get_value_for_generator( 'cols', $options ); ?>
41
  'name' => '',
42
  'id' => null,
43
  'class' => null,
44
+ 'maxlength' => null,
45
  'cols' => 50,
46
  'rows' => 5,
47
  'value' => '',
66
  array(
67
  'id' => $this->atts['id'],
68
  'class' => $this->atts['class'],
69
+ 'maxlength' => $this->atts['maxlength'],
70
  'cols' => $this->atts['cols'],
71
  'rows' => $this->atts['rows'],
72
  'value' => $value,
114
  <?php $class = $this->get_value_for_generator( 'class', $options ); ?>
115
  <input type="text" name="class" value="<?php echo esc_attr( $class ); ?>" />
116
  </p>
117
+ <p>
118
+ <strong>maxlength</strong>
119
+ <?php $maxlength = $this->get_value_for_generator( 'maxlength', $options ); ?>
120
+ <input type="text" name="maxlength" value="<?php echo esc_attr( $maxlength ); ?>" />
121
+ </p>
122
  <p>
123
  <strong>cols</strong>
124
  <?php $cols = $this->get_value_for_generator( 'cols', $options ); ?>
classes/models/class.form.php CHANGED
@@ -227,9 +227,11 @@ class MW_WP_Form_Form {
227
  * @return string
228
  */
229
  public function start( $options = array() ) {
 
 
230
  $options = array_merge(
231
  array(
232
- 'action' => '',
233
  'enctype' => 'multipart/form-data',
234
  ),
235
  $options
@@ -589,6 +591,7 @@ class MW_WP_Form_Form {
589
  $defaults = array(
590
  'id' => null,
591
  'class' => null,
 
592
  'cols' => 50,
593
  'rows' => 5,
594
  'value' => '',
227
  * @return string
228
  */
229
  public function start( $options = array() ) {
230
+ $action = '';
231
+ $action = apply_filters( 'mwform_form_start_attr_action', $action );
232
  $options = array_merge(
233
  array(
234
+ 'action' => $action,
235
  'enctype' => 'multipart/form-data',
236
  ),
237
  $options
591
  $defaults = array(
592
  'id' => null,
593
  'class' => null,
594
+ 'maxlength' => null,
595
  'cols' => 50,
596
  'rows' => 5,
597
  'value' => '',
mw-wp-form.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: MW WP Form
4
  * Plugin URI: https://plugins.2inc.org/mw-wp-form/
5
  * Description: MW WP Form is shortcode base contact form plugin. This plugin have many features. For example you can use many validation rules, inquiry data saving, and chart aggregation using saved inquiry data.
6
- * Version: 4.3.2
7
  * Author: inc2734
8
  * Author URI: https://2inc.org
9
  * Text Domain: mw-wp-form
3
  * Plugin Name: MW WP Form
4
  * Plugin URI: https://plugins.2inc.org/mw-wp-form/
5
  * Description: MW WP Form is shortcode base contact form plugin. This plugin have many features. For example you can use many validation rules, inquiry data saving, and chart aggregation using saved inquiry data.
6
+ * Version: 4.4.0
7
  * Author: inc2734
8
  * Author URI: https://2inc.org
9
  * Text Domain: mw-wp-form
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === MW WP Form ===
2
- Contributors: inc2734, ryu263, tomothumb, nanniku, mt8.biz, NExt-Season, kuck1u, mypacecreator, mh35, grace-create
3
  Donate link: https://www.amazon.co.jp/registry/wishlist/39ANKRNSTNW40
4
  Tags: plugin, form, confirm, preview, shortcode, mail, chart, graph, html, contact form, form creation, form creator, form manager, form builder, custom form
5
  Requires at least: 4.0
6
  Tested up to: 5.5
7
- Stable tag: 4.3.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -48,7 +48,8 @@ Source: https://developers.google.com/chart/
48
  * [Takashi Nojima](https://github.com/nojimage)
49
  * [herikutu](https://github.com/herikutu)
50
  * [tsucharoku](https://github.com/tsucharoku)
51
- * [t-hamano](https://github.com/t-hamano)
 
52
 
53
  == Installation ==
54
 
@@ -73,6 +74,10 @@ Do you have questions or issues with MW WP Form? Use these support channels appr
73
 
74
  == Changelog ==
75
 
 
 
 
 
76
  = 4.3.2 =
77
  * Fix fatal error on saved contact data page.
78
 
1
  === MW WP Form ===
2
+ Contributors: inc2734, ryu263, tomothumb, nanniku, mt8.biz, NExt-Season, kuck1u, mypacecreator, mh35, grace-create, musus, wildworks
3
  Donate link: https://www.amazon.co.jp/registry/wishlist/39ANKRNSTNW40
4
  Tags: plugin, form, confirm, preview, shortcode, mail, chart, graph, html, contact form, form creation, form creator, form manager, form builder, custom form
5
  Requires at least: 4.0
6
  Tested up to: 5.5
7
+ Stable tag: 4.4.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
48
  * [Takashi Nojima](https://github.com/nojimage)
49
  * [herikutu](https://github.com/herikutu)
50
  * [tsucharoku](https://github.com/tsucharoku)
51
+ * [Tetsuaki Hamano](https://github.com/t-hamano) ( [t-hamano](https://profiles.wordpress.org/wildworks/) )
52
+ * [Susumu Seino](https://github.com/musus) ( [t-hamano](https://profiles.wordpress.org/musus/) )
53
 
54
  == Installation ==
55
 
74
 
75
  == Changelog ==
76
 
77
+ = 4.4.0 =
78
+ * Add filter hook `mwform_form_start_attr_action`.
79
+ * Add maxlength attribute to textarea field arguments.
80
+
81
  = 4.3.2 =
82
  * Fix fatal error on saved contact data page.
83
 
templates/form-fields/textarea.php CHANGED
@@ -10,6 +10,7 @@
10
  name="<?php echo esc_attr( $name ); ?>"
11
  <?php echo MWF_Functions::generate_input_attribute( 'id', $id ); ?>
12
  <?php echo MWF_Functions::generate_input_attribute( 'class', $class ); ?>
 
13
  <?php echo MWF_Functions::generate_input_attribute( 'cols', $cols ); ?>
14
  <?php echo MWF_Functions::generate_input_attribute( 'rows', $rows ); ?>
15
  <?php echo MWF_Functions::generate_input_attribute( 'placeholder', $placeholder ); ?>
10
  name="<?php echo esc_attr( $name ); ?>"
11
  <?php echo MWF_Functions::generate_input_attribute( 'id', $id ); ?>
12
  <?php echo MWF_Functions::generate_input_attribute( 'class', $class ); ?>
13
+ <?php echo MWF_Functions::generate_input_attribute( 'maxlength', $maxlength ); ?>
14
  <?php echo MWF_Functions::generate_input_attribute( 'cols', $cols ); ?>
15
  <?php echo MWF_Functions::generate_input_attribute( 'rows', $rows ); ?>
16
  <?php echo MWF_Functions::generate_input_attribute( 'placeholder', $placeholder ); ?>