Support » Plugin: Contact Form 7 » Custom user fields as defaults in contact form

Viewing 5 replies - 1 through 5 (of 5 total)
  • I have also question about that. Tag [_post_name] for email message works great, but I would like to add also custom field with default value of post name. It does not have to be edditable but visible.

    One more question. Where can I edit code (what file) for value of logged in user. I use plugin for logging to website that stores variables of users in some other way so I think I have to change it to work with CF, and get correct value for e.g. “default:user_first_name”.

    Thank you very much in advance for your answer.

    @cccook – As per the Forum Welcome, please post your own topic.

    Posting in an existing topic prevents being able to track issues by topic. Added to which, your problem – despite any similarity in symptoms – is likely to be completely different.

    Thread Starter raquelxmoss

    (@raquelxmoss)

    Thanks for your response Buzztone — I did try the dynamic text plugin but I couldn’t get it to work and didn’t find much help in the documentation. Probably my own stupidity.

    In the end, I adapted this tutorial to suit my needs, then used the standard markup as suggested in the Contact Form 7 documentation.

    For example, using the tutorial I linked, I created a field named ‘address’ and then added default:user_address to Contact Form 7. Works perfectly, and I can create as many custom user meta fields as I like!

    @raquelxmoss: thank you! I’ve been breaking my head thinking of very difficult methods and your solution was so simple and it works beautifully. I thought that “default:user_” was just for the original metadata, not for the custom created metadata. One thing: don’t forget to add “user_” to the name of your field.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Custom user fields as defaults in contact form’ is closed to new replies.