Gravity Forms eWAY
[resolved] Use eway filters only on specific forms (4 posts)

  1. tcsolutions
    Posted 3 years ago #

    I have a couple of payment forms with different gravity formid's used for different purposes on the same site.

    To modify the eway invoice description I am using the gfeway_invoice_desc filter but this modifies the description of all forms

    It doesn't seem possible to add a filter with a special name like gfeway_invoice_desc_12 so it will only apply to formid 12

    I can put some logic in to check for the formid within the filter function but before doing so wanted to check if I am not doing it right or if there is another elegant solution (maybe wrap in a gravity form pre-submission filter.

    This is a great plugin!


  2. webaware
    Plugin Author

    Posted 3 years ago #


    There are no form-specific filters in this plugin, so you'll need to add some logic. Here's a Gist showing how.


    It has logic for picking the description by the form ID, or by the value of a hidden field called "Invoice Description". If you use the latter, you can populate the invoice description dynamically and reuse the same form across multiple pages.


  3. tcsolutions
    Posted 3 years ago #

    Thanks Ross - the example was very useful and I have setup different descriptions depending on what form they are filling out.

    I am putting all sorts of dynamic goodies into the description depending on what the user puts in the from and so as to not get them into a mysterious error situation they cannot correct I am truncating any description that exceeds the eway limit.

    return substr($desc, 0, 255);

    Thanks for the quick response.

  4. webaware
    Plugin Author

    Posted 3 years ago #

    G'day Steve, good stuff. It sounds like you're on top of it!


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Gravity Forms eWAY
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.