Hey there,
I am trying to have gravity forms automatically do some things for me when creating a new post.
I have two fields involved in this problem. The first one is the post body which is coming through just fine. The second one is a custom field I inserted into the form for a youtube video URL. I want to do a couple things with this URL.
The URL looks like this: http://youtu.be/gukwO4uCgTY
This is the ID of the video in the URL above: gukwO4uCgTY
I want to take the URL and pull only the ID out of it.
Then I want the following code to be inserted into the post in a way thats invisible to the user, and have that ID inserted where indicated below (between the slashes).
<a href="
<?php get_permalink(); ?>
">
<img alt="" src="http://img.youtube.com/vi/********INSERT_ID_HERE***********/2.jpg" title="Test Image" class="alignnone" width="120" height="90" />
Is there a way to pass PHP and HTML in to the body of the post or the template?