# Issues With Gravity Forms Ajax On Mobile

**URL:** <https://community.gravityforms.com/t/issues-with-gravity-forms-ajax-on-mobile/17532>\
**Category:** Get Help\
**Tags:** custom, mobile\
**Created:** [May 24, 2024, 1:48am UTC](https://community.gravityforms.com/t/issues-with-gravity-forms-ajax-on-mobile/17532 "2024-05-24T01:48:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![user664bef4699303152](https://avatars.discourse-cdn.com/v4/letter/u/8e7dd6/32.png) [@user664bef4699303152](https://community.gravityforms.com/u/user664bef4699303152)\
**Post date:** [May 24, 2024, 1:48am UTC](https://community.gravityforms.com/t/issues-with-gravity-forms-ajax-on-mobile/17532/1 "2024-05-24T01:48:37Z")

</div>

I’m trying to embed a Gravity Form on all of my blog posts. I initially tried to do this with ‘Ad Inserter’ plugin and works ok. But then when I turned on Ajax (ajax=“true”) in shortcode there were conflicts.

So I created a custom plugin to embed the form in every post…this works on desktop and when I test in mobile on chrome—but on safari its just a spinning wheel of death:

```auto
// Function to append Gravity Form to post content
function append_gravity_form_to_posts($content) {
    if (is_single() && in_the_loop() && is_main_query()) {
        ob_start();
        gravity_form(1, false, false, false, '', true);
        $form = ob_get_clean();
        $content .= $form;
    }
    return $content;
}
add_filter('the_content', 'append_gravity_form_to_posts');

```

I did test just embedding the form via blocks on one page and it works fine on desktop and mobile. but again, I need to include the form on over 100 posts.

anything I’m doing wrong here or is there a better way to embed to ensure that Ajax is working correctly?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/2X/f/fef63f0599c45e0218c30d9f5d7ca8bff9b00189.png) [@system](https://community.gravityforms.com/u/system)\
**Post date:** [June 23, 2024, 1:48am UTC](https://community.gravityforms.com/t/issues-with-gravity-forms-ajax-on-mobile/17532/2 "2024-06-23T01:48:51Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
