Is it possible to have a form page for logged-out users where values are stored persistently?
You could always stored the selections in cookies or localStorage, then query the database via ajax calls on subsequent pages.
You could always stored the selections in cookies or localStorage, then query the database via ajax calls on subsequent pages.
Dynamic price for payment button
How to manage to submit WPForms at our webpage
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 }
Embed PHP script into WP – what is the best way
Custom form that stores data in mysql database
Can’t find function which is called in a wordpress theme
Get all users from role and add to dropdown (select) – wordpress, javascript
Field validation strlen works in php7.4 fails 8.1 [closed]
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’);