Support » Plugin: ACF Field For Contact Form 7 » Buy Pro version but no default selection possible?

  • Resolved pictibe

    (@pictibe)


    Hi,

    I bought Pro version but no default selection possible?

    I need a standard value for all sites and only if the admin select another field it should be used.

    I upload the pro version but nothing changed?

    Florian

Viewing 1 replies (of 1 total)
  • Plugin Author KrishaWeb

    (@krishaweb)

    Hello @pictibe

    You can use the below filter to keep one contact form selected by default.

    add_filter( 'acf/prepare_field/type=acf_cf7', function( $field ) {
    	if ( is_admin() && empty( $field['value'] ) ) {
    		$field['value'] = '586'; // Contact form 7 ID which you wish to keep default selected
    	}
    	return $field;
    } );

    Let us know once you try this.

    Thanks

    • This reply was modified 2 months, 2 weeks ago by KrishaWeb.
    • This reply was modified 2 months, 2 weeks ago by KrishaWeb.
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.