Support » Fixing WordPress » Force to show all fields in comment forms to the logged-in users

  • I want to force to show all fields (if possible these can pre-filled with user own e-mail and name data) to the logged-in users. How can this be done?

    • This topic was modified 2 months, 1 week ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic
Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    It would require custom coding. The “comment_form_field_comment” filter could be used like an action hook to output the other fields. It’s intended for changing the field HTML, but it fires at the right time to output other content. You can simply return the passed HTML unchanged. You’d have to recreate the other field HTML or get them from the prior “comment_form_fields” filter, saving them as a global array to keep them in scope. As long as the field names are correct the form handler will handle the fields as expected. Use different names if you want the fields to be read-only.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.