Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Creating Advanced Forms with Gravity Forms (WordCamp San José 2018)

Creating Advanced Forms with Gravity Forms (WordCamp San José 2018)

Gravity Forms is a robust plugin allowing you to create forms of any kind for your WordPress site. We will walkthrough some of the most powerful features that often go unnoticed including conditional logic, dynamic population, merge tags and more.

Travis Lopes

July 21, 2018
Tweet

More Decks by Travis Lopes

Other Decks in Technology

Transcript

  1. Creating Advanced Forms with Gravity Forms

    View full-size slide

  2. Travis Lopes
    Developer @ Rocketgenius
    Owner & Developer @ ForGravity
    travislop.es
    [email protected]

    View full-size slide

  3. What is Gravity Forms?
    Gravity Forms is the Easiest Tool to create

    Advanced Forms for your WordPress site
    Email Notifications
    File Uploads
    Multi-Page Forms
    Save and Continue
    Payment Forms
    Limit & Schedule Forms
    Post Creation Calculations

    View full-size slide

  4. Exclusive Offer 

    for WordCamp San José 2018 Attendees
    GET A FREE LICENSE

    using your name and email at
    gravityforms.com/wcsj

    View full-size slide

  5. DYNAMIC

    POPULATION

    View full-size slide

  6. What is Dynamic Population?
    Dynamic Population can happen via…
    Allows for fields to be pre-propulated
    from external values
    Shortcode
    Query String Hooks

    View full-size slide

  7. What is Dynamic Population?
    Resize This Window

    View full-size slide

  8. What is Dynamic Population?
    Resize This Window

    View full-size slide

  9. Resize This Window
    Dynamic Population via Query String
    Enable dynamic population in
    Advance field settings


    View full-size slide

  10. Resize This Window
    Dynamic Population via Query String
    Enable dynamic population in
    Advance field settings


    Provide a parameter name for field.


    View full-size slide

  11. Resize This Window
    Dynamic Population via Query String
    http://example.com/?why=project
    Enable dynamic population in
    Advance field settings


    Provide a parameter name for field

    Add Dynamic population value in
    URL

    View full-size slide

  12. Resize This Window
    Dynamic Population via Query String
    http://example.com/?why=project
    Enable dynamic population in
    Advance field settings


    Provide a parameter name for field

    Add Dynamic population value in
    URL

    View full-size slide

  13. Dynamic Population via Shortcode
    Resize This Window
    Enable dynamic population in
    Advance field settings
    Add Dynamic population value 

    in shortcode
    Provide a parameter name for field

    View full-size slide

  14. Dynamic Population via Hooks
    Enable dynamic population in Advance field settings
    add_filter( ‘gform_field_value', ‘my_custom_population_function’, 10, 3 );
    function my_custom_population_function( $value, $field, $name ) {
    return ‘dynamic value’;
    }
    Provide a parameter name for field.
    Add in Hook Code:

    View full-size slide

  15. Dynamic Population via Hooks
    Enable dynamic population in Advance field settings
    add_filter( ‘gform_field_value_why', ‘my_custom_population_function’, 10, 3 );
    function my_custom_population_function( $value, $field, $name ) {
    return ‘dynamic value’;
    }
    Provide a parameter name for field
    Add in Hook Code:

    View full-size slide

  16. CONDITIONAL
    LOGIC

    View full-size slide

  17. Resize This Window
    What is Conditional Logic?

    View full-size slide

  18. Where can I use Conditional Logic?
    Almost
    Everywhere!

    View full-size slide

  19. Where can I use Conditional Logic?
    Visibility Actions
    Confirmations
    Field
    Section
    Page
    Submit Button
    Notifications
    Export Entries
    Feeds

    View full-size slide

  20. Examples of Conditional Logic

    View full-size slide

  21. Examples of Conditional Logic

    View full-size slide

  22. Examples of Conditional Logic

    View full-size slide

  23. Examples of Conditional Logic

    View full-size slide

  24. MERGE

    TAGS

    View full-size slide

  25. Anatomy of a Merge Tag
    {Shirt Size:4}
    Field Name Field ID

    View full-size slide

  26. Anatomy of a Merge Tag
    {Shirt Size:4:value}
    Field Name Field ID Field Modifier

    View full-size slide

  27. Anatomy of a Merge Tag
    {:4}
    Field ID

    View full-size slide

  28. Basic Merge Tags
    Display logged in user’s email address
    {user:user_email}
    Display date in dd/mm/yyyy format
    {date_dmy}
    HTTP referer
    {referer}
    Display logged in user’s first name
    {user:first_name}

    View full-size slide

  29. Merge Tags in Field Values
    Resize This Window Resize This Window

    View full-size slide

  30. Merge Tags in Confirmations
    Resize This Window

    View full-size slide

  31. Merge Tags in Notifications
    Resize This Window Resize This Window

    View full-size slide

  32. EXTENDING

    GRAVITY FORMS

    View full-size slide

  33. Add Ons
    You can also extend Gravity Forms
    using a vast array of Add-Ons
    Email Integrations
    Payment Third Party
    Feature

    View full-size slide

  34. Email Marketing Add-Ons

    View full-size slide

  35. Payment Add-Ons

    View full-size slide

  36. Feature Add-Ons

    View full-size slide

  37. Integration Add-Ons

    View full-size slide

  38. 3rd Party Add-Ons

    View full-size slide

  39. ¿PREGUNTAS?

    View full-size slide

  40. Thank You
    Get notes and download slides at
    http://travislop.es/wcsj2018

    View full-size slide