Title: Steps beyond 3 [SOLVED]
Last modified: March 3, 2019

---

# Steps beyond 3 [SOLVED]

 *  Resolved [Daniel Proczko](https://wordpress.org/support/users/diggler/)
 * (@diggler)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/steps-beyond-3/)
 * I realized this plugin does not go beyond step 3.
 * I found [a thread that identified where to extend the functionality](https://wordpress.org/support/topic/not-working-after-3-steps/),
   but it required hardcoding a specific number, which would mean every form has
   to have the exact same steps.
 * The solution needs to work on any form and dynamically count how many steps a
   form has.
 * Here’s the solution:
 * In the init.php doc in “inc->frontend” you can replace the original function 
   with the following.
 *     ```
       function cf7mls_multistep_shortcode_callback($tag)
   
           $tag = new WPCF7_Shortcode($tag);
       	$steps = 0;
       	$contact_form = wpcf7_get_current_contact_form();
       	$form_tags = $contact_form->scan_form_tags();
       	$steps += count($form_tags)/2;
           $found = 0;
   
           $html = '';
   
           if ($form_tags) {
   
               foreach ($form_tags as $k => $v) {
   
   
                   if ($v['type'] == $tag->type) {
   
                       $found++;
   
                   }
   
                   if ($v['name'] == $tag->name) {
   
                       if ($found <= $steps) {
   
                           $html = '<button type="button" class="cf7mls_back action-button" name="cf7mls_back">Back</button>';
   
                           $html .= '<button type="button" class="cf7mls_next cf7mls_btn action-button" name="cf7mls_next">Next</button>';
   
                           $html .= '</fieldset><fieldset class="fieldset-cf7mls">';
   
                       }
   
                       break;
   
                   }
   
               }
   
           }
       ```
   
 * (I’m sure someone can simplify what I wrote. I’m not the most experienced.)
 * To NinjaForms, could this be baked into the next update?
    -  This topic was modified 7 years, 2 months ago by [Daniel Proczko](https://wordpress.org/support/users/diggler/).
    -  This topic was modified 7 years, 2 months ago by [Daniel Proczko](https://wordpress.org/support/users/diggler/).
      Reason: Note to the developer

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

 *  [blazmate](https://wordpress.org/support/users/blazmate/)
 * (@blazmate)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/steps-beyond-3/#post-11632899)
 * Do you have luck with this? I’m getting errors around this plugin and seems no
   updates or responses to any requests for months.
 *  [shailumehta25](https://wordpress.org/support/users/shailumehta25/)
 * (@shailumehta25)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/steps-beyond-3/#post-11633499)
 * Instead Of Full Function Code Change in inc/frontend/init.php File
    Just Change
   if ($found <= 2) Replace With This if ($found <= 5)

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

The topic ‘Steps beyond 3 [SOLVED]’ is closed to new replies.

 * ![](https://ps.w.org/cf7-multi-step/assets/icon-256x256.png?rev=2775701)
 * [Multi Step for Contact Form 7](https://wordpress.org/plugins/cf7-multi-step/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cf7-multi-step/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cf7-multi-step/)
 * [Active Topics](https://wordpress.org/support/plugin/cf7-multi-step/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cf7-multi-step/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cf7-multi-step/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [shailumehta25](https://wordpress.org/support/users/shailumehta25/)
 * Last activity: [6 years, 11 months ago](https://wordpress.org/support/topic/steps-beyond-3/#post-11633499)
 * Status: resolved