0

A form, which is generated by a credit card processor is loaded via javascript. The form works fine when loaded normally can be seen here, but mobile users see the below and are unable to scroll. Supposedly the form has a mobile version but that is apparently failing to load?form

The form is loaded onto the page using:

<div id="bbox-root"></div>
<script type="text/javascript">
       window.bboxInit = function () {
           bbox.showForm('313b-e4b8cefad90c');
       };
       (function () {
           var e = document.createElement('script'); e.async = true;
           e.src = 'https://bbox.blackbaudhosting.com/webforms/bbox-min.js';
           document.getElementsByTagName('head')[0].appendChild(e);
       } ());
</script>

I suspect that the theme of the site is somehow interacting with the form and causing the issue, but I'm not sure how to 1)diagnose that issue 2)remedy it without just stripping the CSS for the whole site.

3
  • Can you explain how the form is added? Is it via plugin, is an iFrame, does it have different stylesheets for mobile vs. desktop. Screen grabs are great for relaying what the issue is, but providing code snippets and details about what generates problematic code is necessary for anyone to provide you with an actual answer to address your issue. Commented Apr 15, 2020 at 19:58
  • Of course. I edited the main post to include some additional context that is hopefully helpful.
    – JFarq
    Commented Apr 15, 2020 at 20:08
  • Answered and I added some screen captures. Commented Apr 15, 2020 at 20:27

1 Answer 1

0

That's a Blackbaud form and I've generally had a bit of trouble with them working on mobile and getting styled just right. Glad to see they've moved away from using iFrames at least.

Anyway, when I check the developer tools there is an element ID'd as #bbox-root.

The CSS for that element has a width declaration of 660px. So it's forcing it to be larger than an actual iPhone screen of 414px or 320px which then puts about half of it off screen.

Looks like you're on SiteGround and the style rule is located in this file: https://givesaintagnes.org/wp-content/uploads/siteground-optimizer-assets/siteground-optimizer-combined-styles-cb7027cddb8bea4cb7f4e68f2840e46a.min.css

So basically, assuming you can't actually edit that file as it's generated via their Optimizer plugin, you'll need to find that line in your CSS and edit it. I'd recommend, assuming the 660px was specified for a reason, the following:

#bbox-root{
     width:100%;
     max-width:660px;
}

That'll make sure the element only hits 100% on smaller screens and on larger screens will constrain the width to 660px.

Additionally you're going to have to write a series of other CSS rules to address how the other elements within that container are getting compressed and misplaced because of the smaller container size.

Here's where, in the developer console, I tested my solution: The CSS fix.

And here's what it looks like: The end result.

2
  • thanks so much for the help! I was able to track down the offending line. I just need to deal with the squishing issue you noted.
    – JFarq
    Commented Apr 15, 2020 at 20:37
  • Fantastic. Best of luck and welcome to WordPress Stack Exchange. Remember to accept the answer if it fixed your issue. 😊 Commented Apr 15, 2020 at 20:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.