Awesome Support Documentation

Tips and Tricks

Prevent The Logged In User From Being Forced To Enter Their Email Address

Most use cases involve non-logged in users.  However, there are some instances where the user might already be logged in.  In these cases, forcing the user to enter an email address in order to map to the ticketing system seems redundant.  Instead, you can create a hidden EMAIL field on the Gravity form and pre-populate it with one of the numerous Gravity Forms Merge Tags; in this case, just set the default for the field to be {user:user_email}

So, your Gravity Forms email field configuration will look like this:

Then, simply map the email field as usual in the Awesome Support Gravity Forms Extension screen.

Using Department And Products (Taxonomy Fields)

Generally, the easiest way to map the Department Products field is to use the POPULATE option.  Here are some ways to make sure you end up with the correct value in the mapped field:

  1. Use a drop-down field in Gravity Forms and then using the POPULATE option when mapping the field.  This is the easiest thing to do.
  2. Use a standard text field in Gravity Forms and enter the ID of the PRODUCT or DEPARTMENT into the field (not the human readable value or slug).  This is useful if you want to pre-populate a hidden field with a particular product – for example you might have a different support form for each of your products or each department.
  3. Use a drop-down field in Gravity Forms that you manually populate with labels and IDs that correspond to those in the PRODUCTS and DEPARTMENTS list.

Using Custom Fields To Trigger Behavior Inside Awesome Support

If you’re a developer you can easily use the contents of custom fields to trigger code inside of Awesome Support.  The general process is:

  1. Add the custom field using the WordPress INIT hook
  2. Setup a function call on the gf_wpas_after_save_form action hook to trigger code using the contents of the custom field.

In version 1.1.0 of the Gravity Forms Bridge we added an example inside the core bridge code.  We created a field called gf_close_ticket using the WP init hook.  You can see this if you search for the function register_field_close_ticket in the class-gravity-forms.php file.

We then added a function called maybe_close_ticket that uses this the contents of this field to determine whether or not to close the ticket. Search for it in the class-ticket.php file.

Share:

Copyright © www.getawesomesupport.com 2014-2018. All rights reserved.