how can add the Import and Export link on custom form?

Hi ,

I have created form for filling the information on front-end for service provider.

please check this form
http://vmedicaltourism.com/google-calendar/?app_provider_id=205

I have to add these link on this page.
1) Import and Update Events from GCal Now.
2) Export and Update Events to GCal Now
3) Test Connection

Let me know how can add these link on custom form for different service provider.

Regards,
Ramesh Chand Pandey

  • Predrag Dubajic
    • Support

    Hi Ramesh,

    Hope you're doing well.

    Ok, so here is something you could try that should work for you.
    Since the export is using AJAX the export will go through all appointments and not just the ones for the current user.

    1) Import and Update Events from GCal Now.

    <a href="<?php admin_url('admin.php?page=app_settings&tab=gcal&gcal_import_now=1&gcal_api_worker_id=' . get_current_user_id() . ''); ?>">Import and Update Events from GCal Now.</a>

    2) Export and Update Events to GCal Now

    <a href="<?php admin_url('admin-ajax.php?action=app-gcal-export_and_update'); ?>">Export and Update Events to GCal Now</a>

    3) Test Connection

    <a href="<?php admin_url('admin.php?page=app_settings&tab=gcal&gcal_api_test=1'); ?>">Test Connection</a>

    Hope this helps.

    Best regards,
    Predrag

  • Michelle Shull
    • DEV MAN’s Apprentice

    Hi Ramesh!

    One thing to keep in mind about the communication between gCal and Appointments+ is that communication between the two requires a WordPress cron to fire. WordPress crons only fire when there is front page traffic on your site, even if you've scheduled your cron to run at particular intervals.

    The easiest way to work around this is to use a third party service for your cron jobs. Here's a great guide for getting that set up.

    Hope this helps, Ramesh!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.