PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Any method to use form method="get" with gform_post_submission

  1. Hi guys!!!

    I bought GF to use it to pass simple form fields to our e-payment provider.
    They support only get method.
    I tried following code, but doesn't work:

    (
    add_action("gform_post_submission", "post_to_przelewy24", 10, 2);
    
    function post_to_przelewy24($entry, $form){
        if($form["id"] != 1) //NOTE: replace 3 with your form id
            return;
        ?>
    <form method="get" action="https://sklep.przelewy24.pl/zakup.php">
    <input type="hidden" name="z24_id_sprzedawcy" value="13040">
    <input type="hidden" name="z24_crc" value="3c021c8b">
    <input type="hidden" name="z24_return_url" value="www.fundacjadziedzic.pl">
    <input type="hidden" name="z24_kwota" value="<?php echo $entry["7"] ?>">
    <input type="hidden" name="z24_language" value="pl">
    <input type="hidden" name="z24_nazwa" value="<?php echo $entry["2"] ?>">
    </form>
            <script type="text/javascript">
                document.getElementById("form_to_przelewy24").submit();
            </script>
        <?php
    }
    )

    question is: have I done something wrong or should I look for other form plugin?

    rgs,
    Jarek

    Posted 11 years ago on Wednesday October 12, 2011 | Permalink
  2. When you say "it doesn't work" what do you mean? What happens? Can you capture or display what's being sent before you send it to check for errors?

    With Gravity Forms and the gform_post_submission hook, you can run whatever code you want, including PHP cURL and can run a GET operation like that as well. I'm not certain what your code would actually do there. It doesn't actually return anything, maybe just displays that form?

    Posted 11 years ago on Thursday October 13, 2011 | Permalink
  3. Hi!

    You are right, I was not to descriptive with statement: "it doesn't work".
    It mean form hangs with rotating circle and nothing happens.

    Hopefully, I solved it with passing parameters in URL, what works for me.

    Let's assume problem is solved.

    But my general perception is that if tool aspires to be "Packed With Features.. Gravity Forms Really Satisfies" it should simply support out of the box all basic form methods, that basic HTML forms support.

    Have a nice weekend,
    Jarek

    Posted 11 years ago on Friday October 14, 2011 | Permalink
  4. Thanks Jarek. Please let us know if you need more help.

    Posted 11 years ago on Saturday October 15, 2011 | Permalink

This topic has been resolved and has been closed to new replies.