• Resolved testfab

    (@testfab)


    Hi guys

    Great plugin, I just had one question. How would I go about changing the radioboxes (when selecting the times in the modal) into checkboxes, so users can select more than one time?

    For example, right now, they can only select 8:00, or 8.30. How can I give them the option to select both? Or to select 8:00 and 12:30 (without needing to make two separate bookings).

    Thanks
    Kris

    http://wordpress.org/plugins/appointment-calendar/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor FARAZFRANK

    (@farazfrank)

    Hi Kris,

    If you want to make possible that client can select multiple time slots in single booking, then there is way:

    First don’t change radio box into check boxes.

    Add new text field labeled by: End Time: on Second Modal Window(second dialog window)

    End Time: <input type="text" name="start_time" id="start_time">

    Allows user to choose/put It’s desired end time in End Time field.

    Then post the End Time value in appointment saving code and assign It in $end_time variable.

    //save appointment and email admin & client/customer
    if( isset($_POST['Client_Name']) && isset($_POST['Client_Email']) ) {
         ...
         $end_time =  date( 'h:i A', strtotime( $_POST['start_time']) );
         ...
    }

    And you done.

    Thanks
    Frank

    Thread Starter testfab

    (@testfab)

    Thanks for the very quick reply, Frank! Greatly appreciated.

    I have a problem though, in that I am not sure where I should make these changes? Which .php file(s) should I edit for the Second Modal Window? Or for the appointment saving code? (data_save?).

    There are a lot of different .php files and I can not easily tell what they are all for. Please provide the specifics for where exactly to change these values.

    Thanks in advance
    Kris

    Plugin Contributor FARAZFRANK

    (@farazfrank)

    You can find & edit above code in appointment-calendar-shortcode.php file in plugin dir.

    Thanks

    Thread Starter testfab

    (@testfab)

    Hi Frank

    Sorry again, for being annoying and asking the same question.

    Finding where to assign the end time variable was not hard, but I have no idea where to add this: End Time: <input type=”text” name=”start_time” id=”start_time”>

    Cannot find where the field values for the modal are.

    Krish

    Plugin Contributor FARAZFRANK

    (@farazfrank)

    Hi Krish,

    Add above field at second modal window.

    Second modal window code in file appointment-calendar-shortcode.php after time slots.

    End Time: <input type="text" name="end_time" id="end_time">

    Thanks & Happy Holidays
    Frank

    Thread Starter testfab

    (@testfab)

    Thanks so much, Frank! Happy New Year to you!

    Could you please tell me if this is correct (where I placed the code), and that is my final request! 🙂

    <div class=”apcal_modal-body”>
    <div id=”timesloatbox” class=”apcal_alert apcal_alert-block” style=”float:left; height:auto; width:90%;”>
    <!—slots time calulation—>
    <?php
    # time-slots calculation
    global $wpdb;
    $ServiceId = $_GET[“ServiceId”];
    $ServiceTableName = $wpdb->prefix.”ap_services”;
    $FindService_sql = “SELECT name, duration FROM $ServiceTableName WHERE id = ‘$ServiceId'”;
    $ServiceData = $wpdb->get_row($FindService_sql, OBJECT);
    $ServiceDuration = $ServiceData->duration;
    End Time: <input type=”text” name=”end_time” id=”end_time”>
    $AppointmentDate = date(“Y-m-d”, strtotime($_GET[‘AppDate’])); //assign selected date by user

    Plugin Contributor FARAZFRANK

    (@farazfrank)

    Hi Testfab,

    Yes, you are right.

    Check this image for more help.

    Thanks
    Frank

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Changing radioboxes to checkboxes in time selection’ is closed to new replies.