• Resolved n0vice

    (@n0vice)


    Hello!

    I tried adding in a new field in the booking form with the help of this guide. It’s successfully showing in the front end, but not on the admin reservation page when I did a test submission of a booking even though I copied both blocks of code to my functions.php file.

    I did a quick var_dump() on $reservation = htl_get_reservation( $post->ID ) and it seems like the custom field (which was supposed to be in $reservation->guest_custom_field) wasn’t stored in the object in the first place.

    Any help is greatly appreciated. TIA!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author benitolopez

    (@benitolopez)

    Hi,

    The code is correct. I tested it again and if you copy/paste the code correctly the field value will shown before the fields of the guest details.

    Anyway, I’ve updated the code in the documentation to display the custom filed in a text input so you can also edit it.

    https://docs.wphotelier.com/article/70-add-new-booking-fields

    Tested and working, so please use the same code you find in the documentation to verify that it works.

    Thread Starter n0vice

    (@n0vice)

    Hi Benito,

    Thank you for the quick response. I tested the updated code as well and it works now!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom booking fields’ is closed to new replies.