I built a multistep form using the technique here https://support.advancedcustomfields.com/forums/topic/how-to-wrap-field-groups/
But how do i trigger the normal validation when the (next button) is clicked using jQuery/javascript?
<form id="ep-reg-form" class="acf-form" action="" method="post">
<ul id="progressbar">
<li class="active">LOGIN INGO</li>
<li>COMPANY INFO</li>
<li>DETAILED DESCRIPTION</li>
</ul>
<fieldset id="field-group-1">
<legend style="display: none;">Login Info</legend>
<?php
acf_form(array(
'form' => false,
'field_groups' => array(2254),
));
?>
<input type="button" name="next" class="next action-button" value="Next" />
</fieldset>
<fieldset id="field-group-2">
<legend style="display: none;">Company Info</legend>
<?php
acf_form(array(
'form' => false,
'field_groups' => array(2291),
));
?>
<input type="button" name="previous" class="previous action-button" value="Previous" />
<input type="button" name="next" class="next action-button" value="Next" />
</fieldset>
<fieldset id="field-group-3">
<legend style="display: none;">Detailed Description</legend>
<?php
acf_form(array(
'form' => false,
'field_groups' => array(2323),
));
?>
<input type="button" name="previous" class="previous action-button" value="Previous" />
<div class="acf-form-submit">
<input type="submit" class="acf-button button button-primary button-large" value="Submit">
<span class="acf-spinner"></span>
</div>
</fieldset>
</form>
I started discussing about it in another topic (Trigger verification of the form without submitting it).
But I don’t have a good solution at the moment.
You can do it with acf/validate_save_post
, see my latests posts here : https://support.advancedcustomfields.com/forums/topic/trigger-verification-of-the-form-without-submitting-it/
The topic ‘Validate custom multistep form on next step button click’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.