Remove e-mail field from “form anonymous”
-
Hi,
I want to remove “e-mail” field from the replay form of anonymous users.
wp-content/plugins/bbpress/templates/default/bbpress/form-anonymous.phpI removed the website field and it works, I’m trying now to remove the e-mail field too but because it’s require filed it doesn’t work!
If i press “submit” nothing happen at all.Okay from what I know i should remove this code
<p> <label for="bbp_anonymous_email"><?php esc_html_e( 'Mail (will not be published) (required):', 'bbpress' ); ?></label><br /> <input type="text" id="bbp_anonymous_email" value="<?php bbp_author_email(); ?>" size="40" name="bbp_anonymous_email" /> </p>
after that what should I do?! 🙂
-
untried, but try adding this to your functions file
add_filter ('bbp_before_filter_anonymous_post_data_parse_args' , 'rew_remove_mail' ) ; function rew_remove_mail ($args) { $args ['bbp_anonymous_email'] = true ; return $args ; }
Hola!
Someone knows the full code for bbpress – remove the site field in anonymous form?I’ve tried something like this (for the whole WP) but it doesn’t work
function remove_url_from_comments($fields) { unset($fields['url']); return $fields; } add_filter('comment_form_default_fields', 'remove_url_from_comments');
Thank!
These fields are in a bbpress template so you need to amend that
find
wp-content/plugins/bbpress/templates/default/bbpress/form-anonymous.phptransfer this to your pc and edit
remove
<p>
<label for=”bbp_anonymous_website”><?php esc_html_e( ‘Website:’, ‘bbpress’ ); ?></label><br />
<input type=”text” id=”bbp_anonymous_website” value=”<?php bbp_author_url(); ?>” size=”40″ maxlength=”200″ name=”bbp_anonymous_website” />
</p>and save
create a directory on your theme called ‘bbpress’
ie wp-content/themes/%your-theme-name%/bbpresswhere %your-theme-name% is the name of your theme
Then transfer the file you saved above and put in in the directory called bbpress that you created above, so you end up with
wp-content/themes/%your-theme-name%/bbpress/form-anonymous.phpbbPress will now use this template instead of the original
Thanks for the detailed answer! It works )))
..I aspire a universal solution now (for a wp and bb) – apparently need to act separately
I know that this is an old thread but I’m hoping to still get a reply. I’m having the same issue trying to disable the name, email and website fields in a bbpress forum. Can someone tell me where/how to “find” the following code? wp-content/plugins/bbpress/templates/default/bbpress/form-anonymous.php
I don’t know where to go to find and replace as the instructions state. Thanks for your help!
This requires you to be able to FTP – do you know how to do this?
Thanks for the response!!! I do not know how to FTP. But if it’s something I can learn watching a few YouTube videos I’m happy to do so. Removing the name and email fields are must haves for my site. I’ll put in whatever work is necessary to learn how to remove them.
I’ve added that capability to my style lack plugin, so add this to your site
once activated go to
dashboard>settings>bbp style pack>Topic/Reply Form
and you will see options for this in items 19,20 & 21
Apologies for the delayed response. I can’t thank you enough for your help! The updates worked and I no longer see those three fields on my site. Oddly, when I try to post a new topic, it now doesn’t register. When I hit submit, there’s no record of the topic or post ever being created. I’ll continue trying to solve for that issue.
If you’d like to share your cashapp, venmo, etc (not sure if there’s a way to provide that privately). I’d love to buy you a cup of coffee/lunch for your help. I never would have figured it out on my own. Thanks again!hmm… I think I have not fixed it enough !!
part of removing those fields was also getting passed the subsequent checks that bbpress does before allowing the topic to be posted. Looks like it is failing one of those if you are not getting posts saved and displayed.
can you try disabling one at a time and see if it never works on posting or doesn’t when x field is missing
I’ve disabled one at a time until all were deactivated and still the post doesn’t register. Any ideas? Thanks again for your help!!!
ok, thanks, i am on holiday at the moment, but if I get some time, I’ll take another look.
I presume you get no errors when you try and post – it is worth scrolling down to the form itself to check that nothing is displayed
Correct. I don’t get any errors and I see no evidence of the submitted post anywhere on the site – lower on the page, on the forums landing page, etc. It doesn’t show up on the topic count either.
Enjoy your vacation!
so quick question – do you have any of the code above active – it should not be, as my plugin should work in its place
I just checked. It doesn’t look like I have the code from the previous posts anywhere on the site. I checked all of the custom CSS screens.
Hi – Just wanted to follow up to see if you have any suggested fixes. DO I need to start over and rebuild the site from scratch? Thanks!
I cannot replicate the problem, I’m not sure what is causing the issue for you.
Starting from scratch is unlikely to get you further.
can you go to
dashboard>settings>bbp style pack>plugin information and scroll down until you find the topic/reply form settings and copy to clipboard and paste in this thread
I copied the entire page. Please let me know if there’s something else you need. Thanks!
Site Details
PHP Version 8.1.29
WP Version 6.5.4
Multisite False
Active Members 1
Total Forums 9
Total Topics 3
Total Replies
Theme Twenty Twenty-Three 1.1
Theme Type FSE Block Theme
bbPress Version 2.6.9
Plugin Version 6.0.5
WP Debugging FalseSite Plugins
MU Plugins Name and Version
– mu1 wpcomsh-loader.phpActive Plugins Name and Version
– active1 Akismet Anti-spam: Spam Protection 5.3.2
– active2 bbp style pack 6.0.5
– active3 bbPress 2.6.9
– active4 Enable Classic Editor 2.6
– active5 WordPress.com Editing Toolkit 4.26529
– active6 Gutenberg 18.5.0
– active7 Jetpack 13.6-a.5
– active8 Layout Grid 1.8.4
– active9 Page Optimize 0.5.5
– active10 Remove Footer Credit 1.0.14
– active11 Simple Custom CSS 4.0.6
– active12 What The File 1.6.0Inactive Plugins Name and Version
– inactive1 BuddyPress 12.5.1
– inactive2 Crowdsignal Forms 1.7.2
– inactive3 Crowdsignal Polls & Ratings 3.1.1
– inactive4 Elementor 3.22.1
– inactive5 WP File Manager 7.2.9File Generations
Filename Last Generation
bspstyle.css 2024-06-23 15:12:11
bspstyle-quotes.css 2024-06-10 13:43:35
bsp_delete.js 2024-06-10 13:43:35Plugin Settings
Option Group Values
Theme Support
bsp_style_settings_theme_supporta:4:{s:3:”fse”;s:1:”1″;s:9:”fse_width”;s:0:””;s:17:”fse_template_page”;s:3:”101″;s:20:”fse_template_version”;s:1:”0″;}
BuddyPress
bsp_buddypress_supportNo values set for: bsp_buddypress_support
Forums Index Styling
bsp_style_settings_fNo values set for: bsp_style_settings_f
Forums Templates
bsp_templatesNo values set for: bsp_templates
Forums Display
bsp_forum_displayNo values set for: bsp_forum_display
Forums Order
bsp_forum_orderNo values set for: bsp_forum_order
Freshness Display
bsp_style_settings_freshnessNo values set for: bsp_style_settings_freshness
Breadcrumbs
bsp_breadcrumbNo values set for: bsp_breadcrumb
Forum Buttons
bsp_style_settings_buttonsNo values set for: bsp_style_settings_buttons
Login
bsp_logina:1:{s:9:”update448″;s:1:”1″;}
Login Failures
bsp_login_failNo values set for: bsp_login_fail
Forum Roles
bsp_rolesNo values set for: bsp_roles
Subscription Emails
bsp_style_settings_emailNo values set for: bsp_style_settings_email
Subscription Management
bsp_style_settings_sub_managementNo values set for: bsp_style_settings_sub_management
Topic Order
bsp_topic_ordera:3:{s:18:”Default_OrderOrder”;s:1:”2″;s:18:”Forum_Order1Forums”;s:0:””;s:11:”reply_order”;s:1:”1″;}
Topic Index Styling
bsp_style_settings_tia:52:{s:19:”Pagination FontSize”;s:0:””;s:20:”Pagination FontColor”;s:0:””;s:19:”Pagination FontFont”;s:0:””;s:20:”Pagination FontStyle”;s:0:””;s:25:”Voice/Post Count FontSize”;s:0:””;s:26:”Voice/Post Count FontColor”;s:0:””;s:25:”Voice/Post Count FontFont”;s:0:””;s:26:”Voice/Post Count FontStyle”;s:0:””;s:27:”Topic Title LinksLink Color”;s:0:””;s:30:”Topic Title LinksVisited Color”;s:0:””;s:28:”Topic Title LinksHover Color”;s:0:””;s:20:”Topic Title FontSize”;s:0:””;s:20:”Topic Title FontFont”;s:0:””;s:21:”Topic Title FontStyle”;s:0:””;s:24:”Template Notice FontSize”;s:0:””;s:25:”Template Notice FontColor”;s:0:””;s:24:”Template Notice FontFont”;s:0:””;s:25:”Template Notice FontStyle”;s:0:””;s:31:”Template NoticeBackground color”;s:0:””;s:32:”Template Notice BorderLine width”;s:0:””;s:32:”Template Notice BorderLine style”;s:0:””;s:32:”Template Notice BorderLine color”;s:0:””;s:20:”Topic Started bySize”;s:0:””;s:21:”Topic Started byColor”;s:0:””;s:20:”Topic Started byFont”;s:0:””;s:21:”Topic Started byStyle”;s:0:””;s:49:”Sticky Topic/ReplyBackground color – sticky topic”;s:0:””;s:55:”Sticky Topic/ReplyBackground color – super sticky topic”;s:0:””;s:26:”Forum Information FontSize”;s:0:””;s:27:”Forum Information FontColor”;s:0:””;s:26:”Forum Information FontFont”;s:0:””;s:27:”Forum Information FontStyle”;s:0:””;s:33:”Forum InformationBackground color”;s:0:””;s:34:”Forum Information BorderLine width”;s:0:””;s:34:”Forum Information BorderLine style”;s:0:””;s:34:”Forum Information BorderLine color”;s:0:””;s:29:”Topic Index Headings FontSize”;s:0:””;s:30:”Topic Index Headings FontColor”;s:0:””;s:29:”Topic Index Headings FontFont”;s:0:””;s:30:”Topic Index Headings FontStyle”;s:0:””;s:13:”Lock IconSize”;s:0:””;s:14:”Lock IconColor”;s:0:””;s:18:”Sticky PinFontSize”;s:0:””;s:15:”Sticky PinColor”;s:0:””;s:11:”empty_forum”;s:0:””;s:19:”empty_forumActivate”;s:1:”1″;s:17:”must_be_logged_in”;s:0:””;s:18:”register_page_page”;s:0:””;s:17:”register_page_url”;s:0:””;s:16:”topic_title_link”;s:1:”0″;s:12:”topic_topics”;s:0:””;s:11:”topic_posts”;s:0:””;}
Topic Previews
bsp_style_settings_topic_previewNo values set for: bsp_style_settings_topic_preview
Topic/Reply Display
bsp_style_settings_ta:51:{s:49:”Topic/Reply ContentBackground color – odd numbers”;s:4:”#fff”;s:50:”Topic/Reply ContentBackground color – even numbers”;s:7:”#fbfbfb”;s:34:”Topic/Reply HeaderBackground color”;s:7:”#f4f4f4″;s:48:”Trash/Spam ContentBackground color – odd numbers”;s:4:”#fdd”;s:49:”Trash/Spam ContentBackground color – even numbers”;s:4:”#fee”;s:36:”Closed Topic ContentBackground color”;s:4:”#fdd”;s:25:”Topic/Reply Date FontSize”;s:0:””;s:26:”Topic/Reply Date FontColor”;s:0:””;s:25:”Topic/Reply Date FontFont”;s:0:””;s:26:”Topic/Reply Date FontStyle”;s:0:””;s:25:”Topic/Reply Text FontSize”;s:0:””;s:26:”Topic/Reply Text FontColor”;s:0:””;s:25:”Topic/Reply Text FontFont”;s:0:””;s:26:”Topic/Reply Text FontStyle”;s:0:””;s:20:”Author Name FontSize”;s:0:””;s:20:”Author Name FontFont”;s:0:””;s:21:”Author Name FontStyle”;s:0:””;s:19:”Reply Link FontSize”;s:0:””;s:19:”Reply Link FontFont”;s:0:””;s:20:”Reply Link FontStyle”;s:0:””;s:15:”Author RoleSize”;s:0:””;s:16:”Author RoleColor”;s:0:””;s:15:”Author RoleFont”;s:0:””;s:16:”Author RoleStyle”;s:0:””;s:16:”Topic HeaderSize”;s:0:””;s:17:”Topic HeaderColor”;s:0:””;s:16:”Topic HeaderFont”;s:0:””;s:17:”Topic HeaderStyle”;s:0:””;s:21:”Topic Admin linksSize”;s:0:””;s:22:”Topic Admin linksColor”;s:0:””;s:21:”Topic Admin linksFont”;s:0:””;s:22:”Topic Admin linksStyle”;s:0:””;s:18:”Revisionsrevisions”;s:3:”all”;s:17:”mentions_priority”;s:0:””;s:12:”mentionsSize”;s:0:””;s:13:”mentionsColor”;s:0:””;s:12:”mentionsFont”;s:0:””;s:13:”mentionsStyle”;s:0:””;s:9:”hide_name”;s:1:”1″;s:11:”hide_avatar”;s:1:”1″;s:28:”participant_trash_topic_text”;s:43:”Are you sure you want to delete this topic?”;s:28:”participant_trash_reply_text”;s:43:”Are you sure you want to delete this reply?”;s:17:”must_be_logged_in”;s:0:””;s:12:”window_links”;s:1:”0″;s:16:”more_less_length”;s:3:”200″;s:9:”more_text”;s:7:”More…”;s:9:”less_text”;s:7:”Less…”;s:21:”new_reply_description”;s:16:”Create New Reply”;s:17:”topic_button_type”;s:1:”1″;s:16:”TopicButtonclass”;s:0:””;s:29:”topic_subscribe_button_prefix”;s:0:””;}
Topic Counts
bsp_settings_topic_countNo values set for: bsp_settings_topic_count
Topic/Reply Form
bsp_style_settings_forma:27:{s:10:”LabelsSize”;s:0:””;s:11:”LabelsColor”;s:0:””;s:10:”LabelsFont”;s:0:””;s:11:”LabelsStyle”;s:0:””;s:25:”Text areaBackground Color”;s:0:””;s:13:”Text areaSize”;s:0:””;s:14:”Text areaColor”;s:0:””;s:13:”Text areaFont”;s:0:””;s:14:”Text areaStyle”;s:0:””;s:22:”ButtonBackground Color”;s:0:””;s:16:”ButtonText Color”;s:0:””;s:20:”SubmittingSubmitting”;s:10:”Submitting”;s:20:”Show_editorsactivate”;s:1:”0″;s:16:”topic_rules_text”;s:0:””;s:16:”reply_rules_text”;s:0:””;s:23:”topic_posting_rulesSize”;s:0:””;s:24:”topic_posting_rulesColor”;s:0:””;s:23:”topic_posting_rulesFont”;s:0:””;s:24:”topic_posting_rulesStyle”;s:0:””;s:35:”topic_posting_rulesBackground Color”;s:0:””;s:31:”topic_posting_rulesborder_color”;s:0:””;s:17:”placeholder_topic”;s:0:””;s:17:”placeholder_reply”;s:0:””;s:12:”htmlActivate”;s:1:”1″;s:15:”nologinActivate”;s:1:”1″;s:15:”errormsgMessage”;s:0:””;s:16:”no_anon_namename”;s:0:””;}
Profile
bsp_profileNo values set for: bsp_profile
Search Styling
bsp_style_settings_searchNo values set for: bsp_style_settings_search
Unread Posts
bsp_style_settings_unreadNo values set for: bsp_style_settings_unread
Quotes
bsp_style_settings_quoteNo values set for: bsp_style_settings_quote
Moderation
bsp_style_settings_modtoolsNo values set for: bsp_style_settings_modtools
Latest Activity Widget Styling
bsp_style_settings_laNo values set for: bsp_style_settings_la
Custom CSS
bsp_cssa:1:{s:3:”css”;s:0:””;}
CSS Location
bsp_css_locationNo values set for: bsp_style_settings_translation
Dashboard Admin
bsp_settings_adminNo values set for: bsp_settings_admin
bbPress Bug Fixes
bsp_style_settings_bugsNo values set for: bsp_style_settings_bugs
Block Widgets
bsp_style_settings_block_widgetsNo values set for: bsp_style_settings_block_widgets
Column Display
bsp_style_settings_column_displayNo values set for: bsp_style_settings_column_display
Topic Form Additional Fields
bsp_style_settings_topic_fieldsNo values set for: bsp_style_settings_topic_fields
I just went back to my test site and it looks like I’m no longer having the issue. I didn’t make any changes to the code, so I’m not sure why it’s working now, but thanks again!
that’s good news – hope it stays fixed !!
- You must be logged in to reply to this topic.