Title: Hooks
Last modified: August 21, 2016

---

# Hooks

 *  Resolved [lesterbryantng](https://wordpress.org/support/users/lesterbryantng/)
 * (@lesterbryantng)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/hooks-5/)
 * Hi,
 * Just wanted to ask about external hooks for Appointments Lite. I’m looking to
   use the Appointments calendar to select an available date and time. I was hoping
   to be able to push the date/time selected, on click, to a form field (via Gravity
   Forms). I’m able to embed the calendar using the [app_monthly_schedule] shortcode,
   but for some reason it isn’t clicking as it does when used on a page.
 * Anyway, Gravity Forms has the capability to dynamically populate a field using
   hooks (among other methods) and was hoping to find out where and which hooks 
   I can use to get the date and time once the calendar is clicked.
 * Here is a sample ([http://www.gravityhelp.com/documentation/page/Using_Dynamic_Population#Hooks](http://www.gravityhelp.com/documentation/page/Using_Dynamic_Population#Hooks))
   of the method used by Gravity Forms and was wondering which function I can use
   to pass on this info to my form?
 * Thanks!
 * [https://wordpress.org/plugins/appointments/](https://wordpress.org/plugins/appointments/)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [David](https://wordpress.org/support/users/ugotsta/)
 * (@ugotsta)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/hooks-5/#post-5078876)
 * Hi [@lesterbryantng](https://wordpress.org/support/users/lesterbryantng/),
 * I hope you’re well today! 🙂
 * Integration like that is actually a bit complex but there’s been a fair amount
   of discussion and details provided that can help with it here:
    [http://premium.wpmudev.org/forums/topic/passing-booking-details-to-a-final-page-which-uses-the-app_confirmation#post-320144](http://premium.wpmudev.org/forums/topic/passing-booking-details-to-a-final-page-which-uses-the-app_confirmation#post-320144)
 * Basically, the idea mentioned is to tie into the plugin’s `app_footer_scripts`
   filter hook in order to add some custom JavaScript to the page to store some 
   data in a browser cookie.
 * Then you can retrieve that cookie later and extract that data for use with Gravity
   Forms.
 * This does involve writing JavaScript code to interact with the button press and
   plugin data so it’s not quite so easy. But that post does provide a lot of information
   that can help with it.
 * I hope that helps and please feel free to ask if you have questions. 🙂
 * Cheers,
    David
 *  Thread Starter [lesterbryantng](https://wordpress.org/support/users/lesterbryantng/)
 * (@lesterbryantng)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/hooks-5/#post-5078879)
 * Hi David,
 * Thank you so much for this. Am sure this will help solve the issue.
 * One more thing, which I’m not exactly sure if this is something with your plug-
   in.
 * Tried using a shortcode on Gravity Forms (HTML block) and the datepicker doesn’t
   seem to be clickable. I only used the [app_monthly_calendar]. So after clicking
   the date, the available times do not change.
 * However, this seems to work properly if I use it on a post/page (Make an appointment
   page). I tried using the form on the “Make an appointment” page and it works 
   perfectly. Then if I remove everything but the form (which still has the [app_monthly_calendar]
   shortcode), then it goes back to being clickable.
 * Apologies if this isn’t on your end, but wanted to find out where the issue is.
   Might this be a clash between two AJAX implementations?
 * Thanks.
 *  [David](https://wordpress.org/support/users/ugotsta/)
 * (@ugotsta)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/hooks-5/#post-5078894)
 * Hey [@lesterbryantng](https://wordpress.org/support/users/lesterbryantng/),
 * Thanks for your question! Could I ask if you’ve got the confirmation shortcode
   included in that page?
 *     ```
       [app_confirmation]
       ```
   
 * That’ll need to be there in order for the further scheduling form to show.
 * Cheers,
    David
 *  Thread Starter [lesterbryantng](https://wordpress.org/support/users/lesterbryantng/)
 * (@lesterbryantng)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/hooks-5/#post-5078895)
 * Hi David,
 * Tried it both ways and same results as the one I mentioned. Was expecting that
   when I only use the [app_monthly_schedule], the date (text) will change as a 
   date is changed then the available times will show up and so on.
 * Thanks!
 *  [David](https://wordpress.org/support/users/ugotsta/)
 * (@ugotsta)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/hooks-5/#post-5078927)
 * Hi [@lesterbryantng](https://wordpress.org/support/users/lesterbryantng/),
 * Thanks for your reply. I wonder if there might be a JavaScript conflict on the
   page? Could you provide a link so we could check that out?
 * Or you could use Google Chrome’s console (Ctrl-Shift-J on PC or Cmd-Opt-J on 
   Mac) and see if there are any errors there.
 * Looking forward to getting this sorted with ya! 🙂
 * Cheers,
    David
 *  Thread Starter [lesterbryantng](https://wordpress.org/support/users/lesterbryantng/)
 * (@lesterbryantng)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/hooks-5/#post-5078960)
 * Hi David,
 * Apologies for the late reply.
 * Here are the sample URLs:
 * First link is the default Make An Appointment page from your plug-in ([http://demo.foodpornjunkies.com/?page_id=4](http://demo.foodpornjunkies.com/?page_id=4)).
 * Second link is when I embedded the [app_monthly_schedule] and [app_confirmation]
   shortcodes onto a form, which uses AJAX ([http://demo.foodpornjunkies.com/?page_id=5](http://demo.foodpornjunkies.com/?page_id=5)).
 * Thanks again.
 *  [David](https://wordpress.org/support/users/ugotsta/)
 * (@ugotsta)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/hooks-5/#post-5078972)
 * Hi [@lesterbryantng](https://wordpress.org/support/users/lesterbryantng/),
 * Hmm, how are you embedded the shortcodes in that form?
 * And would that need to be embedded? You could just use custom JavaScript to interact
   with the plugin by way of AJAX, then use some means through Gravity Forms to 
   get that information from the page.
 * Or by simply detecting the mouse click on the page, you could gather the data
   from the page and send that through to Gravity Forms to use somehow.
 * Unfortunately, since it’s quite a complex task, it’s not something we can really
   help much with or provide many references too. But I do hope that helps. 🙂
 * Cheers,
    David

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Hooks’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/appointments_eaf36c.svg)
 * [Appointments](https://wordpress.org/plugins/appointments/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/appointments/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/appointments/)
 * [Active Topics](https://wordpress.org/support/plugin/appointments/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/appointments/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/appointments/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [David](https://wordpress.org/support/users/ugotsta/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/hooks-5/#post-5078972)
 * Status: resolved