I have this in a php file from Contact Form 7, which I load into a modal window (FancyBox) and I would like to close it after the user will press the Submit button.
I was thinking of adding onSubmit="action" to the form but I don't know how or which one is the function I am supposed to use to close the modal window?
$form .= '<form action="' . esc_url_raw( $url ) . '" method="post"' . ' class="' . esc_attr( $class ) . '"' . $enctype . '>' . "\n";
Is this the right approach?
Also, if I can make it to click on a PayPal button right after that, it will be brilliant.