wp-content/plugins/contact-form-7-multi-step-module/cf7msm.php
/**
 * Sets the current step if valid.
 */
Sets the current step if valid.
Sets the current step if valid .
function cf7msm_set_step( $result, $tags )
{
    if ( !empty($_POST['cf7msm-step']) ) {
        $step = $_POST['cf7msm-step'];
        if ( preg_match( '/(\\d+)-(\\d+)/', $step, $matches ) ) {
            $curr_step = $matches[1];
            $last_step = $matches[2];
            if ( $result->is_valid() ) {
                if ( $curr_step != $last_step ) {
                    cf7msm_set( 'cf7msm-step', $curr_step );
                }
            } else {
                $stored_step = cf7msm_get( 'cf7msm-step' );
                if ( $stored_step >= $curr_step ) {
                    cf7msm_set( 'cf7msm-step', intval( $curr_step ) - 1 );
                }
            }
        }
    }
    return $result;
}
function cf7msm_set_step ( $ result , $ tags ) { if ( ! empty ( $ _POST [ 'cf7msm-step' ] ) ) { $ step = $ _POST [ 'cf7msm-step' ] ; if ( preg_match ( '/(\\d+)-(\\d+)/' , $ step , $ matches ) ) { $ curr_step = $ matches [ 1 ] ; $ last_step = $ matches [ 2 ] ; if ( $ result -> is_valid ( ) ) { if ( $ curr_step != $ last_step ) { cf7msm_set ( 'cf7msm-step' , $ curr_step ) ; } } else { $ stored_step = cf7msm_get ( 'cf7msm-step' ) ; if ( $ stored_step >= $ curr_step ) { cf7msm_set ( 'cf7msm-step' , intval ( $ curr_step ) - 1 ) ; } } } } return $ result ; }
Sets the current step if valid.
Sets the current step if valid .
//reduce it so user cannot move onto next step.