Plugin Directory

Changeset 1512544


Ignore:
Timestamp:
10/11/2016 08:35:07 AM (9 years ago)
Author:
thebluecube
Message:

Changing the error message for the 'requiredWith' validation rule to a simpler one.

Location:
bluecube-mighty-gravity-forms
Files:
5 added
3 edited

Legend:

Unmodified
Added
Removed
  • bluecube-mighty-gravity-forms/trunk/bluecube-mighty-gravityforms.php

    r1504489 r1512544  
    66 * Description: This plugin adds some advanced features to Gravity Forms e.g. custom validation rules etc.
    77 * Author: Blue Cube Communications Ltd
    8  * Version: 1.1.1
     8 * Version: 1.1.2
    99 * Author URI: https://thebluecube.com
    1010 * License: GPLv2 or later
  • bluecube-mighty-gravity-forms/trunk/class/Mighty_Gravity_Forms.php

    r1504489 r1512544  
    4040        add_filter('gform_field_input', [$this, 'addFrontEndNumberRangeChange'], 10, 5);
    4141
    42           // Adding a shortcode to have advanced conditional logic in email notifications
    43           add_shortcode('gf_notification_conditional_block', [$this, 'notificationConditionalBlockShortcode']);
     42        // Adding a shortcode to have advanced conditional logic in email notifications
     43        add_shortcode('gf_notification_conditional_block', [$this, 'notificationConditionalBlockShortcode']);
    4444    }
    4545
     
    619619        $ruler_field_expected_value = (isset($validation_rule[2]) && $validation_rule[2] != '') ? $validation_rule[2] : null;
    620620
     621        $error_msg = 'This field is required.';
    621622        if (is_null($ruler_field_expected_value)) {
    622623            // This means we only need to check the existence of the ruler field (which we are already sure about if you have a look at the previous lines)
     
    624625            if ($this->fieldValueIsEmpty($field) && ! $this->fieldValueIsEmpty($ruler_field)) {
    625626                // The field value is empty so we should invalidate the form
    626                 $this->invalidateTheField($field, 'The input "'.$field->label.'" is mandatory when you have filled the input "'.$ruler_field->label.'".');
     627                $this->invalidateTheField($field, $error_msg);
    627628            }
    628629
     
    631632            if ($this->fieldHasTheValue($ruler_field, $ruler_field_expected_value) && $this->fieldValueIsEmpty($field)) {
    632633                // The field value is empty while the ruler field has the expected value
    633                 $this->invalidateTheField($field, 'The input "'.$field->label.'" is mandatory when the input "'.$ruler_field->label.'" has the value of "'.$ruler_field_expected_value.'".');
     634                $this->invalidateTheField($field, $error_msg);
    634635            }
    635636        }
  • bluecube-mighty-gravity-forms/trunk/readme.txt

    r1504489 r1512544  
    55Requires at least: 4.6
    66Tested up to: 4.6.1
    7 Stable tag: 1.1.1
     7Stable tag: 1.1.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
    1010
    11 This plugin adds some additional features to the Gravity Forms plugin: Advanced input validations, Input ID change, Form access control, Advanced conditional logic for email notifications
     11This plugin adds some additional features to the Gravity Forms plugin: Advanced input validations, Input ID change, Form access control etc.
    1212
    1313== Description ==
     
    3535== Changelog ==
    3636
     37= 1.1.2 =
     38* Changing the error message for the 'requiredWith' validation rule to a simpler one.
     39
    3740= 1.1.1 =
    3841* Fixing a bug in the maybeMarkTheFormAsValid method
Note: See TracChangeset for help on using the changeset viewer.