• Hello,

    I would like to set automatically default values in wizard step “Website informations” : owner, address…

    Is it possible to implement this feature ?

    Reason : I’m injecting values from one custom plugin to all pre-installed plugins when I’m installing new wordpress project. I didn’t find hook to do this in your plugin core files.

    Thank you.
    Best regards.

    Joffrey

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Rogier Lankhorst

    (@rogierlankhorst)

    You can set the default value like this:

    add_filter( 'cmplz_default_value', 'cmplz_set_default', 10, 2 );
    function cmplz_set_default( $value, $fieldname ) {
    	if ( $fieldname == 'organisation_name' ) {
    		$value = 'My Company';
    	}
            return $value;
    }

    If you actually want to save the setting:

    cmplz_update_option('wizard', 'organisation_name', 'My Company' );

    Thread Starter Joffrey Nicoloff

    (@agent3w)

    Thank you Rogier, this is exactly what I was looking for 😉

    Thanks again.

    Best regards.
    Joffrey

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

The topic ‘Hook default values in wizard’ is closed to new replies.