[Solved] How to hide email field from front end  

  RSS

sunny
(@sunny)
Eminent Member
Joined: 2 years ago
Posts: 42
04/03/2019 2:32 pm  

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
(@astghik)
Support Team Admin
Joined: 2 years ago
Posts: 3130
04/03/2019 4:12 pm  

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
(@sunny)
Eminent Member
Joined: 2 years ago
Posts: 42
04/03/2019 4:23 pm  

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
(@astghik)
Support Team Admin
Joined: 2 years ago
Posts: 3130
04/03/2019 5:05 pm  

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
(@sunny)
Eminent Member
Joined: 2 years ago
Posts: 42
04/03/2019 5:07 pm  

Great! Thanks.

 


Astghik
(@astghik)
Support Team Admin
Joined: 2 years ago
Posts: 3130
04/03/2019 5:23 pm  

@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: