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.

do string operation on entered value

  1. Hi, I would much appreciate a pointer to help me figure something out: I want to add a "filter" (or is it a "hook?" - not sure) to change any entries containing "https" to "http" for a specific form field. How do I go about this? I know I need to add something to functions.php, and probably use a hook or a filter, but I'm not sure how to proceed.

    Your advice will be much appreciated.

    Marc

    Posted 11 years ago on Wednesday May 16, 2012 | Permalink
  2. David Peralty

    You'll probably want to use
    http://www.gravityhelp.com/documentation/page/Gform_pre_submission_filter

    As for changing the https to http you'll want to use PHP for that.
    http://php.net/manual/en/function.str-replace.php

    Posted 11 years ago on Wednesday May 16, 2012 | Permalink
  3. David, thanks a bunch!

    Is there a "hooks and filters for beginners" page someplace?

    Posted 11 years ago on Wednesday May 16, 2012 | Permalink
  4. David Peralty

    Not currently, no. There is only the documentation section with all the hooks and filters listed within including examples.

    Posted 11 years ago on Wednesday May 16, 2012 | Permalink
  5. OK, David. Thank you.

    Posted 11 years ago on Wednesday May 16, 2012 | Permalink
  6. David Peralty

    It is now on my list of things to do though. :)

    Posted 11 years ago on Wednesday May 16, 2012 | Permalink