How to redirect to a page after submitting form data?

Form handling needs to happen in functions.php (or equivalent) so that it triggers before headers are sent. Here is the how I achieved redirection after form submit: add_action(‘init’, ‘redirectAfterSubmit’); function redirectAfterSubmit() { if (isset($_POST[“submit”])) { insert_row(); wp_redirect( “/thank-you”, 301 ); die(); } } function insert_row(){ // form handing here }

Elementor form – checkboxes validation

For anyone interested, I was able to resolve it like so: function form_checkboxes_validation(){ ?> <script type=”text/javascript”> (function($){ $(“#send-request”).click(function(){ if(! $(‘input[name=”form_fields[suite][]”]’).is(‘:checked’)) { alert(“Please select at least one suite!”); return false; } }); })(jQuery); </script> <?php } add_action(‘wp_footer’, ‘form_checkboxes_validation’);

I cannot enter the letter C in the form [closed]

Most likely you have some functionality to block the C character. If you disable JavaScript and disable the loading indicator, you can use the character. There is a lot of discussion online on the merit of these kinds of tools (trying to stop copying). As you’ve seen now: it worsens other functionality while giving little … Read more