Summary step confirmation with contact form 7 before submit the form
-
Hello, Im trying to create a modal form, who;
1) the first modal have the form.
2) the second modal its a summary who show all the fields to confirm all, and have the button to confirm and send the mail.The first part its ok. I just have the problem with the second one,
¿How I could show all the filled fields values in the second modal?
-I tried to show it with JS but doesn’t work
-I tried with the submit button who show the name field value with an alerts but that doesn’t work for me becasue it sends the form. Maybe the only think is changing the submit function but im not sure how to do it, I used the next script from the contact form support page ¿How I could show the rest of the fields? ¿And changing the submit button behavior?:<script type=”text/javascript”>
var wpcf7Elm = document.querySelector( ‘#modalwindowx’ );
wpcf7Elm.addEventListener( ‘wpcf7submit’, function( event ) {
var inputs = event.detail.inputs;for ( var i = 0; i < inputs.length; i++ ) {
if ( ‘your-name’ == inputs[i].name ) {
alert( inputs[i].value );
break;
}
}
}, false );
</script>
The topic ‘Summary step confirmation with contact form 7 before submit the form’ is closed to new replies.