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.

Verify YouTube link

  1. kbkisan
    Member

    Hi there, I was wondering if it is possible to somehow verify a YouTube link when submitting a form.

    In my form I want the users to be able to paste their YouTube link into a field ( not embed code, just the link e.g. http://www.youtube.com/watch?v=qNhPYj-5rIY)

    And then when the user submits the form use the google API to verify if the video exists.
    http://gdata.youtube.com/feeds/api/videos/qNhPYj-5rIY

    That way the user won't be able to submit a link that does not work.

    I am not sure how I can make this work, maybe by being able to create a custom "Submit" button to append this check to it ?

    Posted 12 years ago on Tuesday June 28, 2011 | Permalink
  2. This isn't a built in feature but there is no reason why it couldn't be done as a customization using the gform_validation hook.

    The gform_validation hook allows you to write your own custom validation for a field. You could write custom validation that checks the data entered in a field against the Google API to validate the video URL.

    A tutorial on the gform_validation hook can be found here:

    http://www.gravityhelp.com/documentation/page/Using_the_Gravity_Forms_%22gform_valiation%22_Hook

    If you need to hire a developer to implement this for you I can refer you to developers with Gravity Forms customization experience.

    Posted 12 years ago on Tuesday June 28, 2011 | Permalink
  3. kbkisan
    Member

    Hi Carl and thank you for your reply. I will take a look at the link you send me, and if I don't figure something out I will get back to you for these recommendations.

    Best regards,
    Fannar

    Posted 12 years ago on Tuesday June 28, 2011 | Permalink