Title: Dynamic readonly
Last modified: January 14, 2020

---

# Dynamic readonly

 *  [krysis163](https://wordpress.org/support/users/krysis163/)
 * (@krysis163)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/dynamic-readonly/)
 * On my cf7 form I have a email element.
    As default it has the user_email `[email*
   your-email default:user_email]` I’d like to set it to readonly – but only in 
   the case that the user is logged in.
 * My current approach (workaround) is
    to do a hook on _wpcf7\_form\_elements_ 
   and grep for the email and set the _readonly_ in there. But I have to be carefully
   and avoid changing in other forms where this should not happen.
 * Is there a better solution?
    Thx

The topic ‘Dynamic readonly’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

## Tags

 * [elements](https://wordpress.org/support/topic-tag/elements/)
 * [output](https://wordpress.org/support/topic-tag/output/)

 * 0 replies
 * 1 participant
 * Last reply from: [krysis163](https://wordpress.org/support/users/krysis163/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/dynamic-readonly/)
 * Status: not resolved