wp-content/plugins/contact-form-7-multi-step-module/form-tags/module-multistep.php
/**
 * Handle the multistep handler
 * This shortcode lets the plugin determine if the form is a multi-step form
 * and if it should redirect the user to step 1.
 */
Handle the multistep handler
This shortcode lets the plugin determine if the form is a multi-step form
and if it should redirect the user to step 1.
Handle the multistep handler This shortcode lets the plugin determine if the form is a multi - step form and if it should redirect the user to step 1 .
function cf7msm_multistep_shortcode_handler( $tag ) {
    $tag = new WPCF7_FormTag( $tag );
    $validation_error = wpcf7_get_validation_error( $tag->name );
    $class = wpcf7_form_controls_class( $tag->type, 'cf7msm-multistep' );
    if ( $validation_error ) {
        $class .= ' wpcf7-not-valid';
    }
    $class .= ' cf7msm-multistep';
    if ( 'multistep*' === $tag->type ) {
        $class .= ' wpcf7-validates-as-required';
    }
    $value = (string) reset( $tag->values );
    $multistep_values = cf7msm_format_multistep_value( $value );
    $step_value = $multistep_values['curr_step'] . '-' . $multistep_values['total_steps'];
    $atts = array(
        'type'               => 'hidden',
        'class'              => $tag->get_class_option( $class ),
        'value'              => $step_value,
        'name'               => 'cf7msm-step'
    );
    $atts = wpcf7_format_atts( $atts );
    $html = sprintf( '<input %1$s />%2$s', $atts, $validation_error );
    $html .= sprintf( '<input %1$s />', wpcf7_format_atts( array( 
        'type'  => 'hidden', 
        'name'  => 'cf7msm-no-ss',
        'value' => ''
    ) ) );
    $submission = WPCF7_Submission::get_instance();
    foreach ($_POST as $name => $value) {
    }
    return $html;
}
function cf7msm_multistep_shortcode_handler ( $ tag ) { $ tag = new WPCF7_FormTag ( $ tag ) ; $ validation_error = wpcf7_get_validation_error ( $ tag -> name ) ; $ class = wpcf7_form_controls_class ( $ tag -> type , 'cf7msm-multistep' ) ; if ( $ validation_error ) { $ class .= ' wpcf7-not-valid' ; } $ class .= ' cf7msm-multistep' ; if ( 'multistep*' === $ tag -> type ) { $ class .= ' wpcf7-validates-as-required' ; } $ value = ( string ) reset ( $ tag -> values ) ; $ multistep_values = cf7msm_format_multistep_value ( $ value ) ; $ step_value = $ multistep_values [ 'curr_step' ] . '-' . $ multistep_values [ 'total_steps' ] ; $ atts = array ( 'type' => 'hidden' , 'class' => $ tag -> get_class_option ( $ class ) , 'value' => $ step_value , 'name' => 'cf7msm-step' ) ; $ atts = wpcf7_format_atts ( $ atts ) ; $ html = sprintf ( '<input %1$s />%2$s' , $ atts , $ validation_error ) ; $ html .= sprintf ( '<input %1$s />' , wpcf7_format_atts ( array ( 'type' => 'hidden' , 'name' => 'cf7msm-no-ss' , 'value' => '' ) ) ) ; $ submission = WPCF7_Submission :: get_instance ( ) ; foreach ( $ _POST as $ name => $ value ) { } return $ html ; }
Handle the multistep handler
 This shortcode lets the plugin determine if the form is a multi-step form
 and if it should redirect the user to step 1.
Handle the multistep handler This shortcode lets the plugin determine if the form is a multi - step form and if it should redirect the user to step 1 .
//populate rest of form in hidden tags. //get all posted data //add hidden elements for any not in current form. //if multistep posted value is greater than current step, populate elements. //print hidden elements //$wpcf7 = WPCF7_ContactForm::get_current();