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.