Insert Website URL without adding http or https

When a visitor enters a URL on the form on the front-end of the site, they can't submit the form unless there is an "http://" OR "https://" in the field.
Second question, I would like to collect email addresses from this slide in, but I need to get notified when a new email address is submitted via this slide-in.
Is there a way to do this, similar to the way Forminator sends an email after a form submission?

  • Ash
    • WordPress Hacker

    Hello Brad

    You can disable default HTML validation for website using the following code:

    add_action( 'wp_footer', function() {
    	?>
    	<script>
    		jQuery( document ).ready(function( $ ) {
    			$( '.hustle-modal-optin_form' ).attr( 'novalidate', 'novalidate' );
    		});
    	</script>
    	<?php
    } );

    You can use this code in your child theme's functions.php if the theme is not changed. Otherwise mu-plugin is the best option. To create a mu-plugin, go to wp-content/mu-plugins folder. If there is no mu-plugins folder then, create one. Now, inside the mu-plugins folder create file with name anything.php (make sure file extension is .php). Now start with a <?php tag and then put the above code.

    Second question, I would like to collect email addresses from this slide in, but I need to get notified when a new email address is submitted via this slide-in.
    Is there a way to do this, similar to the way Forminator sends an email after a form submission?

    I am afraid, this is not possible out of the box I had a talk with the developer and this could be a potential feature in one of the next versions.

    We may try to use a hook to send a simple email. Will it be okay for now? Please let us know.

    Have a nice day!

    Cheers,
    Ash

  • Brad
    • Flash Drive

    Worked perfectly! Can I put in a request to add this natively? I think that less-web savvy users may not know they are supposed to add "http://" and will give up without submitting.

    Also, I was able to stay with the Hustle email collection form and receive a notification from MailChimp when a new address is added via this slide-in by setting it to submit to a specific MailChimp Audience. Email notifications for new submissions would be another great Hustle feature!

    Thanks.

  • Nithin
    • Support Wizard

    Hi Brad,

    Can I put in a request to add this natively? I think that less-web savvy users may not know they are supposed to add "http://" and will give up without submitting.

    Yes, I do agree this could be a handy addition. I'm bringing this into our team's attention so that they could check the possibilities of implementing this down the roadmap.

    Also, I was able to stay with the Hustle email collection form and receive a notification from MailChimp when a new address is added via this slide-in by setting it to submit to a specific MailChimp Audience. Email notifications for new submissions would be another great Hustle feature!

    With MailChimp, the subscription notifications can be controlled in the MailChimp side:
    https://mailchimp.com/help/change-subscribe-and-unsubscribe-notifications/

    I suppose you meant email notifications for submissions in "Local Hustle List", right? I'm passing this feedback to your team too.

    Thanks for your feedback. Really appreciate. Have a nice day ahead. :slight_smile:

    Regards,
    Nithin

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.