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.

PHP Includes

  1. twescott
    Member

    I'd like to include a PHP file into the gravityforms/entry_list.php file.
    I'm including some custom code into this file which integrates with Twilio. Next to one of my fields, I have a custom link called 'SEND SMS', which when clicked, fires off an SMS to the number provided by my form user.

    There are some variables in my Twilio PHP files which I'd like to include in entry_list.php, so that I can keep track of how many messages have been sent to each user and include that next to the SEND SMS link, so that it reads something like, SEND SMS (1), the number in parentheses being the number of times a message has been sent; a variable calculated in a Twilio PHP file. I must be missing something, though, since I can't seem to successfully include the file.

    Is it possible to include a PHP file in another directory into this particular plugin file? If so, how?
    include('path'); seems to be failing me, or else I'm just stupid.

    Thanks in advance.

    Posted 11 years ago on Wednesday August 8, 2012 | Permalink
  2. This customization falls outside the support we can provide in the help forums. Additionally, it's PHP you need help with, not Gravity Forms.

    However, you should be able to either "include_once('./path/to/file.php');" or "require_once('./path/to/file.php');". Be sure you can access the file at the filepath your include statement thinks it exists at.

    Posted 11 years ago on Wednesday August 8, 2012 | Permalink
  3. twescott
    Member

    Thank you for your help. I got it working.

    Posted 11 years ago on Wednesday August 8, 2012 | Permalink
  4. Very good. Thank you for the update.

    Posted 11 years ago on Thursday August 9, 2012 | Permalink

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