How do you achieve this?
With the built-in tag function: https://contactform7.com/setting-default-values-to-the-logged-in-user/
In this particular case, my client is a dance school. I use a single CF7 form to perform the following functions:
Apply for site registration to access exclusive Parent Portal content
Apply for school registration of their child(ren)
Sort dancers by class & strip all but 2 highest levels (all others train free)
Sign application form (sign the box or upload existing sig file)
Create tuition order for the 2 highest levels (or single item if 1 dancer)
Create separate WooCommerce account
Send application emails to school staff; modified copy goes to applicant
Send WC email of payment to bookkeeper; modded copy to applicant
Copy all data to separate database plugin for review/revision by school staff
My goal was to automate the process as much as possible, so all of the above is carried out with one click of the submit button. There’s a separate checkout page for making payments, of course.
An example of how I use placeholders on my form is my Emergency Contact fields. I have two of them, because separating first and last names and splitting into separate meta data entries is better for filing/spreadsheet purposes. I use the same label for both, because long labels such as “Emergency Contact First Name” cause display issues (wraps, pushes fields down on mobile due to the field widths being reduced, etc.). It’s really messy looking. Hence, I use placeholders like so: [text* Emergency_Contact_First_Name placeholder "First Name"]
, same for Last Name field.
It would be helpful to have conditional tags, where the default would override the placeholder in the case of a logged-in user, else the placeholder is used, like so: [text* Emergency_Contact_First_Name placeholder "First Name" default:user_emergency_contact_first]
I have several other fields that guide the new user with placeholders. I really would rather not use hover tooltips for this particular form – they would also be pointless for logged-in users, so unless the tooltips are conditional, it would look odd presenting them to existing users who are already familiar with the form and whose data is prefilled to begin with.
As mentioned before, I can create a duplicate form if need be, for the sole purpose of using placeholder tags, and use redirects for logged vs. non-logged users to take them to the appropriate form, but having two [almost] identical forms seems redundant and a waste of storage space.
Btw, it would also be helpful to preset/prefill all other field types, such as calendar, dropdowns, etc. I haven’t checked whether this is already covered, but if default only prefills text fields, adding the other field types would be great.
-
This reply was modified 1 year, 3 months ago by IT Hertz. Reason: last paragraph