• Resolved Lovings

    (@lovings)


    Hello,
    Awesome booking plugin! I allow only the registered WP users to use the booking form. Is it possible to pre-fill the booking client info with the WP registered users fields and meta?

    Thanks ??

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Webba Appointment Booking

    (@webba-agency)

    Hi,

    Thank you for using Webba Booking!

    That can be achieved using the integration of Webba with the Contact Form 7.

    The following articles will help you:

    Using custom fields in the booking form

    Setting default values to the logged-in user

    The limitation is that the phone field is not the default wp field therefore it can not be pre-filled this way.

    If you will have any questions, feel free to contact us.

    Thread Starter Lovings

    (@lovings)

    Hi, I found the solution, and it’s very simple and easy.

    The Contact Form 7 Dynamic Text Extension plugin has lots of different presets for grabbing the information, besides the url variables used in your example. When I looked at its code, I saw

    CF7_get_current_user
    CF7_GET
    CF7_get_post_var
    CF7_bloginfo
    CF7_URL
    CF7_get_custom_field
    – all of which can be used instead of the CF7_POST shortcode.

    It was super easy to add the replacement shortcodes into the custom Contact Form 7 fields as follows:
    Name: [dynamictext* wbk-name id:wbk-name class:wbk-text “CF7_get_current_user key=’display_name'”]<br /><br />

    Email: [dynamictext* wbk-email id:wbk-email class:wbk-text “CF7_get_current_user key=’user_email'”]<br /><br />

    Phone: [dynamictext* wbk-phone id:wbk-email class:wbk-text “CF7_get_current_user key=’user_phone'”]<br /><br />

    Additional notes:<br />
    [textarea wbk-comment id:wbk-comment class:wbk-text]

    [dynamichidden custom-field1 id:custom-field1 class:wbk-text “CF7_get_current_user key=’ID'”]

    This can pull out all and any of the user meta, custom and default – as users for this project fill out their phone number during registration, I was able to completely prefill the booking form :-).

    • This reply was modified 3 years, 10 months ago by Lovings.
    Plugin Author Webba Appointment Booking

    (@webba-agency)

    Hi,

    Thank you very much for sharing this!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Possible to auto-fill registered user’s name, email and phone?’ is closed to new replies.