Home Forums Landing Pages [Landing Pages] Added an email validation to a form using the class but it doesnt work

This topic contains 29 replies, has 2 voices, and was last updated by  Hudson Atwell 3 weeks, 6 days ago.

Viewing 15 posts - 1 through 15 (of 30 total)
  • Author
    Posts
  • #131427

    Raf
    Participant

    We need to be able to validate emails on submit and if the email is invalid remain the landing page.

    I added a plugin from a 3rd party org.

    They offer ability to prevent spam by:
    Validate email on registration
    Validate email for comments
    Hook to is_email() function

    Also on the inbound form there are fields to support third party classes. I have placed the class “bpmvp-mail” in the Inbound class field.

    After testing however it doesnt work. Everytime I “Submit” the page it just moves onto the submission landing page

    How can I get this working?

    #131433

    Hudson Atwell
    Keymaster

    I’m not sure I’ll be able to help too much on this one since it involves integrating with an unfamiliar third party plugin.

    I can check the landing page for obvious JS errors though if you share a link. Are you trying to prevent spam? Here’s our best guide: http://docs.inboundnow.com/guide/mitigating-spam-sent-through-inbound-forms/

    #131440

    Raf
    Participant

    The Akismet plugin is very useful for mitigating spam in comments but it isn’t built to force subscriber emails to be from known, accepted domains.

    In our case we want to be able to exclude subscribers from temporary email addresses and hard to qualify as commercial addresses such as gmail, yahoo etc.

    As I pointed out the 3rd party app provides an integration by simply adding the class to the email type. However, even though inbound has a field to allow 3rd party classes

    https://www.screencast.com/t/KEUFto7yU3tn

    and even though Inbound successfully adds the class:
    <input type=”email” class=”inbound-input inbound-input-text email inbound-email bpmvp-mail” name=”wpleads_email_address” id=”wpleads_email_address” value=”” data-map-form-field=”wpleads_email_address” required data-required=”true”/>

    The class is not respected and the “Redirect URL” is activated after submission.

    #131443

    Raf
    Participant
    This reply has been marked as private.
    #131448

    Hudson Atwell
    Keymaster
    This reply has been marked as private.
    #131450

    Raf
    Participant
    This reply has been marked as private.
    #131453

    Hudson Atwell
    Keymaster
    This reply has been marked as private.
    #131455

    Raf
    Participant
    This reply has been marked as private.
    #131456

    Hudson Atwell
    Keymaster
    This reply has been marked as private.
    #131457

    Raf
    Participant
    This reply has been marked as private.
    #131463

    Hudson Atwell
    Keymaster

    Is this the plugin?

    https://github.com/Dimasmagadan/bpmvp-email-validator/

    If it intercepts submissions based on the presence of a class name then our target solution would be to load the plugin’s JS manually.

    There is a lp_head hook you could hook into to call the file directly.

    Most templates have this bit of code in them:
    https://github.com/inboundnow/inbound-pro/blob/master/core/landing-pages/templates/simple-solid-lite/index.php#L85-L88

    #131465

    Raf
    Participant

    Yes thats the correct plugin.

    #131473

    Raf
    Participant

    I had a look at the code but I couldnt see any straight forward way yet to attach their javascript to the Onclick of an Inbound Forms submit button to interrupt that process before the page moves forward to the Redirect URL

    #131477

    Hudson Atwell
    Keymaster
    #131526

    Raf
    Participant

    It looks like Im supposed to edit ./wp-content/plugins/inbound-pro/core/shared/assets/js/frontend/analytics-src/analytics.events.js and add something to form_before_submission?

    I took a look at the code and I’m out of my depth here. I wouldn’t know where to begin. The documentation is unhelpful as it doesn’t really step me through the process and assumes some basic knowledge which I clearly dont have. I need some more guidance please.

Viewing 15 posts - 1 through 15 (of 30 total)

You must be logged in to reply to this topic.