• Resolved hannala

    (@hannala)


    Hello, how do I pre-populate fields in Contact form 7?

    So that in the field where the user types in their e-mail address it says “Your e-mail address”, in grey text.

    And where they type in their name it says “Your name”, in grey text.

    I think this is called pre-populating, but I’m not entierly sure, so it was a bit hard for me to search the forum. Please correct me if I’m wrong ??

    • This topic was modified 4 years, 2 months ago by hannala.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello @hannala,

    I think the option you are referring to the placeholder, a kind of watermark that serves to give a clue to the user of the information he/she has to enter in the field.

    Contact Form 7 support placeholders for the most of the built-in fields. Continuing to use the example you mentioned above, you need the option placeholder within your form tags followed by the value you want to display, this way:

    <label>Name:
       [text* your-name placeholder "Your name"]</label>
    
    <label>Email:
       [email* your-email placeholder "Your email address"]</label>

    Best regards,
    Yordan.

    Thread Starter hannala

    (@hannala)

    Wow, thank you so much, that was exactly what I was wondering ??

    • This reply was modified 4 years, 2 months ago by hannala. Reason: I didn't check the mark as resolved checkbox
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to pre-populate fields in Contact form 7’ is closed to new replies.