• Resolved Md Akter Hosen

    (@tareqhi)


    Plz have a look of Support reply from Gravity Forms.
    Your plugin is conflicting with Gravity Forms core.
    I reported to GF team for following issue

    Issue
    In my site: If I input a numeric zero 0 as field value, it is saving in database but this value is not showing in entries page, single entry page & edit entry page.
    Please find this credential for login and see the problem, I got.
    I just noticed that Numeric 0 is not saving either in Single line text field, Number field, Select field also.
    I found this error in version 1.9.18.3 and also in 2.0-beta-2

    And they replied this:

    Richard replied
    
    Apr 26, 6:47am
    Hi Akter,
    
    Sorry for the delay, we have had a bit of backlog in the development queue. I'm afraid this issue is being caused by a plugin conflict. When I checked your site and disabled the Ajax Upload for Gravity Forms plugin the 0 field values were displayed.
    
    I'm afraid you'll need to contact the developer of the conflicting plugin and ask them to take a look at their usage of the gform_entry_field_value filter to ensure it still returns the field value even when it is 0.
    
    Regards,
    
    __________________________________________
    
    Richard Wawrzyniak
    Gravity Forms
    http://www.gravityforms.com
    
    Follow us on Twitter: http://www.twitter.com/rocketgenius
    Friend us on Facebook: http://www.facebook.com/rocketgenius

    https://wordpress.org/plugins/ajax-upload-for-gravity-forms/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author ovann86

    (@ovann86)

    Hey,

    I can see what the issue is, but it’s not a conflict with GF core or an issue with the use of the gform_entry_field_value filter, it’s in fact a bad placement of a return value.

    I’m not sure when Ill have time to push out an update with the fix, hopefully soon, but in the meanwhile you can do this to fix this issue.

    FILE: gravity-forms-ajax-upload-list-field.php
    LINE 121 – comment out, e.g. change to
    //return $value;

    AFTER LINE 122, create a new line and add in
    return $value;

    Which leaves you with this

    public function clickable_list_values( $value, $entry, $field ) {
    			if ( $value ) {
    				$is_entry_detail = GFCommon::is_entry_detail();
    				if ( !( $is_entry_detail && 'edit' == rgpost( 'screen_mode' ) ) && is_object( $field ) && 'list' == $field->type ) {
    					$has_columns = is_array( $field->choices );
    					$values = unserialize( $value );
    						if ( !empty( $values ) ) {
    							// get Ajax Upload options
    							$form_id = $entry['form_id'];
    							foreach ( $values as &$val ) {
    								if ( $has_columns ) {
    									foreach ( $val as &$column ) {
    										if ( GFCommon::is_valid_url( $column ) ) {
    											$column = self::make_column( $column );
    										}
    									}
    								} elseif ( GFCommon::is_valid_url( $val ) ) {
    									$val = self::make_column( $val );
    								}
    							}
    						}
    					$value = serialize( $values );
    				}
    				//return $value;
    			}
    			return $value;
    		} // END clickable_list_values

    I’ll need to review what I am trying to achieve out of this function and why it is affecting non-ajax upload fields. But in the meanwhile that’ll get the ‘0’ values displaying.

    Thread Starter Md Akter Hosen

    (@tareqhi)

    Oh Fantastic, that’s working fine. I just did what you said.

    Thanks a lot.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Conflicting with core Gravity Forms code’ is closed to new replies.