• My contact form is not submitting in Blackberry browsers (with JavaScript enabled, default user agent). With all fields filled out, when I press the Submit button the page does not submit or refresh but jumps to the top of the contact form. No error message is received.

    Does anyone know what’s going on, and is anyone else experiencing this bug also?

Viewing 11 replies - 1 through 11 (of 11 total)
  • I have an iPhone, not a BlackBerry.
    But a URL to your form would be very helpful for anyone to help you.

    Mike

    I was searching the forums earlier today about this issue, then I worked out what the problem was.

    It’s an issue with how the Blackberry seems to interpret the action attribute of a form tag, when the action has reference to a named anchor.

    Check the source code generated by si-contact-form, and you’ll notice the action adds #FormID — whatever that form ID is. This led to the clicking of the submit button simply jumping to the top of the form rather than actually submitting. This does seem isolated to Blackberry browsers.

    The (less than ideal) way I have solved this is to remove the # addition from the plugin. Open si-contact-form-display.php and remove that reference from around lines 34 and 42. That should fix it. I say it’s not ideal because I guess that updating the plugin in future will restore the old code and reintroduce the issue. Still, it gets it working…

    Good luck

    John

    The #FormID serves a purpose of putting focus back on the form after submit. It is called a HTML anchor link. This is most useful if the form is on a long page or if there is more than one form on a page.

    This is really a blackberry bug that should be reported / fixed by blackberry.

    It’s totally Blackberry that’s at fault, but would it be a bad thing to try to override the anchor linking in the event that there is not a great deal of content to skip past to get to the form? Adding a content filter after the form turned out to be the least destructive method for me. I’d sooner have said screw Blackberry, but the client wouldn’t let me ??

    add_filter('the_content', 'remove_si_anchors', 100);
    
    function remove_si_anchors($content){
    	$content = str_replace('#FSContact1','',$content);
    	return $content;
    }

    Apart from the obvious inability to snap to the form on submit, are there any other pitfalls I’m overlooking by applying something like that?

    Cheers!

    J

    It looks like it would work, the only thing is if they add anymore forms then you have #FSContact2, #FSContact3, #FSContact4, etc.
    So a preg_replace would be better
    $content = preg_replace('/#FSContact\d+/','',$content);

    Good call on preg_replace, should have thought of that, thank you!

    J

    Morning.

    I have the same issue.
    Did this solution resolve this?
    If so, could you be so kind and let me know where exactly i need to ad the code specified above?

    Hey

    Incorporating the preg_replace into the filter and function, you get:

    add_filter('the_content', 'remove_si_anchors',100);
    
    function remove_si_anchors($content){
    	$content = preg_replace('/#FSContact\d+/','',$content);
    	return $content;
    }

    Place this in your functions.php file in your theme. This works well if you need to get over the Blackberry bug.

    J

    Thank you.
    I appreciate your assistance and will give it a try.

    It would be nice to detect the Blackberry browser and conditionally apply the function. Even nicer would be for Blackberry to fix the bug.

    Agreed. BB’s issue is causing a bit of grief on my side and it doesn’t appear they are paying any attention to this issue.
    Do you by any chance know if anybody using Contact Form 7 has had the same issue and managed to resolve it?

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Plugin: Fast Secure Contact Form] Form not submitting on Blackberry’ is closed to new replies.