Notifications
Clear all

[Solved] How to hide email field from front end

6 Posts
2 Users
0 Reactions
3,119 Views
(@sunny)
Trusted Member
Joined: 7 years ago
Posts: 69
Topic starter  

I am using multiple comment forms for different pages and on one page I want to hide the email field to not be displayed on that specific page. How can I do that?


   
Astghik
(@astgh)
Illustrious Member Admin
Joined: 7 years ago
Posts: 6193
 

Hi @sunny,

I suggest you create a new comment form with hidden email field and display the comment form for the specific page using its ID. More info here:

https://wpdiscuz.com/docs/wpdiscuz-documentation/getting-started/custom-comment-form/comment-form-settings/#comment_form_for_post_id


   
(@sunny)
Trusted Member
Joined: 7 years ago
Posts: 69
Topic starter  

hi @astghik how do I make the email field hidden? I can't see any option to hide the email field in the backend, can you send some screenshots?


   
Astghik
(@astgh)
Illustrious Member Admin
Joined: 7 years ago
Posts: 6193
 

ah @sunny,

I've forgotten to mention that there is no option to hide the default name and email fields. The only way to hide those fields is CSS code, that should be added in "Custom CSS" textarea of the current form, that is used for specific pages. 

The CSS code is:

.wpdiscuz-item.wc_email-wrapper.wpd-has-icon {
display: none !important;
}

Screenshot here:

Edit screen

   
(@sunny)
Trusted Member
Joined: 7 years ago
Posts: 69
Topic starter  

Great! Thanks.

 


   
Astghik
(@astgh)
Illustrious Member Admin
Joined: 7 years ago
Posts: 6193
 

@sunny,

Please forget to set the email field not required before hiding.

More info here: https://wpdiscuz.com/docs/wpdiscuz-documentation/getting-started/custom-comment-form/comment-form-builder/


   
Share:
Scroll to top