I have a paid Twilio account, and so when setting up a Twilio alert via Gravity Forms + Twilio integration, I have a blank field where I can type in a mobile phone number of my choice.
When an item is created in my Gravity form, Twilio then looks to that number and fires off an alert SMS. Great. This is out of the box functionality and it works very well.
What I'd like to do is pass a user entered field from my Gravity form to this Twilio 'To Number' variable. For instance, in my form, I'll ask for a user's mobile phone number. That way the Twilio alert is sent to my user, and not to me, or to a static 'To Number'.
There appears to be some precedent for this, as the Message area in the Twilio alert setup allows me to incorporate user entered fields into the SMS message that's sent out.
To the best of my understanding, this is the relevant line of PHP:
else{
?>
<input type="text" name="gf_twilio_to" value="<?php echo esc_attr($config["meta"]["to"]) ?>">
<?php
}
This is the else component in a loop. The loop is looking at my Twilio account status. If it's a sandboxed account, the page will only show me verified numbers to send the alert to. Because I have a paid account, however, I'm forwarded to the else part of this loop, where I can type in a number of my choice.
Unless I'm completely mistaken, I need to echo the value of my 'Email' variable from one of my Gravity forms. It may not be as easy as that, but, that's why I'm here. I don't know.
Any help is appreciated.