Skip to content

Notice: Trying to get property of non-object #18

@dwaqaddi

Description

@dwaqaddi

Hi Elliot,

I'm experiencing and issue with the plugin. It generates this error:

Notice: Trying to get property of non-object in /home/comonede/MesSites/travelersparking.com/wp-content/themes/travellers/inc/partials/gravity_form_code.php on line 4

Notice: Trying to get property of non-object in /home/comonede/MesSites/travelersparking.com/wp-content/themes/travellers/inc/partials/gravity_form_code.php on line 5

Oops! We could not locate your form.

"gravity_form_code.php" contains the code below:

<div>
    <?php 
        $form = get_sub_field('custom_form_gravity');
        gravity_form_enqueue_scripts($form->id, true);
        gravity_form($form->id, true, true, true, '', true, 1); 
    ?>
</div>

When i try to var_dump($form). it only returns:

string(3331) ""

Im using the acf gravity form plugin inside "acf flexible content". Acf version is 4.4.0 and Gravity is 1.9.

Thanks,
Darwin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions