• Hey guys,

    I ran into a problem lately while using your plugin:
    I’m calling the function “gravity_form” twice (for the same form) – to get the form markup once with ajax and once without ajax.

    $jsform = gravity_form(2, false, false, false, '', true, 12, false);
    $nojsform = gravity_form(2, false, false, false, '', false, 12, false);

    As soon as the function “gravity_form” is called twice (for the same form in the same loop) the plugin reports errors:

    Undefined offset: 1 on line 110
    A non well formed numeric value encountered on line 29

    I’m guessing when calling the function “gravity_form” for the second time (with the same form id): Might there still be hanging data around from the earlier call?

    Both function calls seem to get executed correctly; I get the desired markup but the displayed errors are kinda unfortunate.

    Cheers
    Sam

    • This topic was modified 6 years, 1 month ago by cerco.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author WebHolism

    (@webholism)

    Hi Sam,

    Thanks for the contact.

    The gravity_forms function is part of the core Gravity Forms plugin, and not something that the Multi Column plugin is responsible for. However, if you believe that your issue relates to the Multi-Column plugin could you provide more information on the error if you have it, such as the exact file generating the problem? Also any steps that we may use to reproduce the issue?

    Many thanks for your time, and we hope to receive a response at your earliest convenience.

    Kind regards.

    Thread Starter cerco

    (@cerco)

    Hey,

    Thanks for your prompt answer.

    Yes, the “gravity_forms” function is part of the core Gravity Forms plugin but it’s the Multi Column plugin which reports those two errors.

    I have a form with the id “2” which I built in the backend via Gravity Forms plugin. I have your plugin activated, the form has the necessary css classes on the corresponding form elements –> it works fine; the form looks as expected, i get two columns. all great if i call the function “gravity_forms” just once.

    The errors only occur if I try to get the form with the “gravity_forms” function twice like so:

    $jsform = gravity_form(2, false, false, false, '', true, 12, false);
    $nojsform = gravity_form(2, false, false, false, '', false, 12, false);

    The two errors mentionend in my first post above are reported by the file of your plugin in gf-form-multicolumn/gf-form-multicolumn.php on the very line numbers mentioned in the the first post above.

    To reproduce the error:
    –> Same form, fetched twice (consecutively) via “gravity_form” function in a php file (template) – and your plugin reports those two errors on line 29 and 110.

    Cheers

    Plugin Author WebHolism

    (@webholism)

    Thanks for the clarification.

    We’ll look into the issue, and see what we can do to resolve it.

    In the meantime, depending on the complexity of your form, you may want to explore the use of the Gravity Form CSS columns (https://www.gravityforms.com/css-ready-classes/).

    We hope to get back to you soon regarding this situation, and thank you for bringing this issue to our attention.

    Kind regards.

    Plugin Author WebHolism

    (@webholism)

    Hi Sam,

    We’ve been investigating this issue, and we hope to have a release over the weekend. If you are still using the plugin, we would really appreciate it if you would try testing the solution for us on a development/staging system.

    Please contact us at [email protected] so that we can send you the new version, if you still need it.

    Thank you.

    Thread Starter cerco

    (@cerco)

    Hey guys,

    That sounds great! Yes, I’m still using the plugin and I’d gladly test the solution.

    Cheers

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Calling the function “gravity_form” twice times provokes error from plugin’ is closed to new replies.