• Resolved aebs

    (@aebs)


    Category fields are not being populated when they are radio buttons (checkboxes work fine).

    Maybe this crashed after fixing this topic: https://wordpress.org/support/topic/multi-select-checkbox-woes?replies=3

    You can make checkboxes and radio buttons both work by changing the following function in the file gravityforms-update-post.php

    Before:

    public static function return_category_field_value( $value, $field )
    {
    	return (! empty(self::$settings['cat_value']) ) ? self::$settings['cat_value'] : $value;
    }

    After:

    public static function return_category_field_value( $value, $field )
    {
    	$result = (! empty(self::$settings['cat_value']) ) ? self::$settings['cat_value'] : $value;
    
    	if ( 'radio' == $field->inputType ) {
    		return $result[0];
    	} else {
    		return $result;
    	}
    }

    https://wordpress.org/plugins/gravity-forms-post-updates/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jupitercow

    (@jcow)

    I need to review this. I should get to it this week, so if you don’t hear from me, let me know.

    mibrenner

    (@mibrenner)

    Did this fix ever get integrated into core? I’m always nervous making changes to plugin files in consideration of my code’s future handlers. 🙂

    Thanks!

    Plugin Author Jupitercow

    (@jcow)

    It is in the latest version.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Category fields (radio buttons) are not being populated’ is closed to new replies.