• Resolved tazar64

    (@tazar64)


    Hello!

    I think there is a bug.

    I have more fields for User extended pod and I use a form plugin (wpform) to get values from the users. Everything works well, except a simple relationship field, Multiple Select.

    When there are more than one checkbox selected in the form, not any value is transmitted.
    If just one checkbox is ticked, it works (one value is transmitted).

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support pdclark

    (@pdclark)

    Hi @tazar64,

    The below plugin should resolve your issue. Change simple_relationship_multiple_select to the name of your field.

    <?php
    /**
     * Plugin Name: Pods — Filter WPForms Relationship Field
     * Description: Filter user meta key <code>simple_relationship_multiple_select</code> in WP Forms so it saves the values in the proper format for a Pods Simple Relationship field.
     * Version: 1
     * Author: 𝜑δ•ℂᴹ
     * Author URI: https://pd.cm
     */
    add_filter(
    	'wpforms_user_registration_process_registration_custom_meta_value',
    	function( $value, $key, $id, $fields, $form_data  ) {
    		if ( 'simple_relationship_multiple_select' !== $key ) {
    			return $value;
    		}
    		return explode( PHP_EOL, $value );
    	},
    	10,
    	5
    );
    Thread Starter tazar64

    (@tazar64)

    Thank you very much, Paul 🙂
    It’s working now.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Multiple select for User extended issue’ is closed to new replies.