Forum Replies Created
-
AuthorPosts
-
June 7, 2025 at 5:13 PM in reply to: ℹ️Integrating GDPR-Compliant Math CAPTCHA into MB Frontend Submission #48402
pluginoven
ParticipantMeta Box Math CAPTCHA
A standalone WordPress plugin that adds a privacy-compliant Math CAPTCHA field type to the Meta Box ecosystem. This plugin provides a secure, AJAX-validated Math CAPTCHA that works seamlessly with both backend and frontend forms, including those created with the Meta Box Frontend Submission addon.1. Install the plugin: https://github.com/baden03/mb-math-captcha
2. Add a math_captcha:$meta_boxes[] = [ 'title' => 'Contact Form', 'id' => 'contact_form', 'fields' => [ // ... your other form fields ... [ 'id' => 'math_challenge', 'name' => 'Are you human?', 'type' => 'math_captcha', 'save_field' => false, // Important: prevents saving the value 'required' => true, ], ], // Add the validation rule for the captcha 'validation' => [ 'rules' => [ 'math_challenge' => [ 'math_captcha' => true, ], ], ], ];June 6, 2025 at 5:14 PM in reply to: ℹ️Integrating GDPR-Compliant Math CAPTCHA into MB Frontend Submission #48387pluginoven
ParticipantMay 20, 2025 at 11:06 PM in reply to: Enqueue Scripts and Styles for advance_select Select2 from RWMB #48297pluginoven
ParticipantHello Peter, thank you for your response. Just some thoughts:
If you don't use the frontend form in the frontend, there isn't any option to enqueue any field scripts (JS, CSS) in the frontend. I think there is no reason to do so.
OK. Imagine if you will that we use metabox to define a complex form and this form allows users to fill this out and submit it from the front end using a plugin like MB Frontend Submission.
Now imagine that some of these fields are used later, on another page that allows users to search and filter using our pre-built form fields. One of them, for the sake of imagination is a language field using advanced_select. Well! we now have a reason to render this form field on the front end, but not as a submission form, oh no, but form that is used as a filter! Can you imagine that? That might be just one reason to do so. Let me know if you need more reasons. I have three more.
You can simply download the Select2 library to your project and enqueue it in the frontend to use a similar feature of select advanced field for your select field.
I refer you to the first post in the thread, right around the part that reads:
We tried to load in the official select2 css and script, but it dose not match the version that RWMB renders.
I invite you to compare the select2 field that meta-box renders next to the standard select2 field and maybe then you can see the difference. For example using a 'textbox' element for the search field rather than an li/span element as in the case of a metabox select2 rendered field.
May 7, 2025 at 4:16 AM in reply to: How to bind to the uploader to pass custom parameters to FormData #48192pluginoven
Participantyeah. no.
May 6, 2025 at 6:18 PM in reply to: How to bind to the uploader to pass custom parameters to FormData #48189pluginoven
ParticipantI take that as a no, not interested.
March 31, 2025 at 9:11 PM in reply to: How to bind to the uploader to pass custom parameters to FormData #47970pluginoven
ParticipantHello Peter.
the real case is an advanced plugin that handles handles the uploading, storing and managing access for sensitive data. If you share your github handle, I would be happy to give you access to the repo that explains everything in detail, including a demo-plugin we created as a proof of concept.We ended up creating a custom field type called
secure_file_advancedthat allows the passing of custom parameters to the $_REQUEST before the file is uploaded. To do this we needed to get very intimate with how metabox.io has implemented the WordPress AJAX Media Uploader on the back and frontend (three uploaders deep). Our case may be an edge case, but it dose extend the flexibility of existing file_advanced field.Regarding field type file: no for all the reasons that we went with file_advanced in the first place.
Also, adding the upload_dir attribute to the field meta, visible on the frontend, is not desired.
Also, with thousands of members we needed more than just a single upload-directory.March 29, 2025 at 7:35 PM in reply to: How to bind to the uploader to pass custom parameters to FormData #47958pluginoven
ParticipantAfter a bit more trial and console.log fun, we have found a solution that works, but it's not pretty.
In the media.js file under MediaButton > events
// Refresh content when frame opens this._frame.on( 'open', function() { // adding the custom parameter to the uploader var some_custom_param = this.controller.get('some_custom_param'); if(some_custom_param){ this._frame.uploader.uploader.uploader.settings.multipart_params.some_custom_param = some_custom_param; } var frameContent = this._frame.content.get(); if ( frameContent && frameContent.collection ) { frameContent.collection.mirroring._hasMore = true; frameContent.collection.more(); } }, this );this is just a test. next steps would be:
- get feedback on if there is a more elegant way to add the multipart_params
- create our own field type 'file_more_advanced' so we don't modify metabox's core files
- OR collaborate on extending the official file_advance field logic to support appending the multipart_paramsThoughts?
January 18, 2024 at 11:08 PM in reply to: ✅datepicker not being translated when using mb_frontend_form #44342pluginoven
ParticipantNo plugin, as there are not multiple languages. Just set WordPress to use a language other than
EN, for example,DE_Formal. And yes the .po and .mo files are inwp-content/languages/pluginsfolder.January 18, 2024 at 5:30 PM in reply to: ✅datepicker not being translated when using mb_frontend_form #44331pluginoven
ParticipantHave not heard back, but I am fighting a similar translation issue with the
[mb_frontend_dashboard]shortcode. In this case, it's very clear that the language files are not being found for the mb-frontend-submission text domain in src/Form.php'confirm_delete' => __( 'Are you sure to delete this post?', 'mb-frontend-submission' ),
is not being translated. As there is not longer time to continue to debug your plugins, we are reverting to hard-coding the language until these issues are resolved. Please let me know when there is something to test.pluginoven
Participantsrc/Forms/info.php:
protected function submit_button() { $submit_button = '<div class="rwmb-field rwmb-button-wrapper rwmb-form-submit"> <div class="rwmb-input"> <button type="submit" class="rwmb-button" id="'.esc_attr( $this->config['id_submit'] ).'" name="rwmb_profile_submit_info" value="1">'.esc_html( $this->config['label_submit'] ).'</button> </div> </div>'; $submit_button = apply_filters( 'rwmb_profile_submit_button', $submit_button, $this->config ); echo $submit_button; }usage:
add_filter( 'rwmb_profile_submit_button', 'fix_frontend_submit_button', 20 , 2 ); function fix_frontend_submit_button( $submit_button, $config ) { $is_complete = get_user_meta( $config['user_id'], 'is_complete', true ); if($is_complete){ $submit_button = ''; } return $submit_button; }src/Forms/Base.php: function render()
... do_action( 'rwmb_profile_before_form', $this->config ); $form = '<form class="rwmb-form mbup-form" method="post" enctype="multipart/form-data" id="' . esc_html( $this->config['form_id'] ) . '">'; $form = apply_filters( 'rwmb_profile_form', $form, $this->config ); echo $form; ...usage:
add_filter( 'rwmb_profile_form', 'fix_frontend_profile_form', 20 , 2 ); function fix_frontend_profile_form( $form, $config ) { $is_complete = get_user_meta( $config['user_id'], 'is_complete', true ); if($is_complete){ $form = str_replace('method="post"', 'disabled', $form); } return $form; }pluginoven
ParticipantAgain we are faced with this issue
While there is a rwmb_frontend_submit_button filter for forms created with mb_frontend_form, there is no such filter for mb_user_profile_info (which can also be used on the front end.This is a missing feature. Where can a pull request be submitted?
pluginoven
Participantupdate, nevermind, found
rwmb_profile_after_processSeptember 12, 2023 at 9:54 PM in reply to: ✅MetaBox's jQuery UI Dialogue CSS is throwing 404 errors #43223pluginoven
ParticipantThank you Peter.
pluginoven
ParticipantThis has been happening across all sites that is running the latest 5.7.5 version of MetaBox.
If it helps, we can provide step-by-step instructions to recreate the issue, but figured it was self explanatory -
AuthorPosts