Forum Replies Created
-
AuthorPosts
-
Mary Anne Lavin
ParticipantI got excited about this too soon. The form is behaving the very same way.
Mary Anne Lavin
ParticipantNo word on this yet, but maybe posting the code for one of the metaboxes will help. This creates a post upon "submit" sometimes. Other times, it returns with empty fields but when the page is refreshed a
Form Re-submissionerror pop ups. If you select "continue" a post is created. Still, at other times, nothing happens after selecting "continue".This is the custom post type
This is the metabox
FYI: YAARP is a plugin
https://wordpress.org/plugins/yet-another-related-posts-plugin/Mary Anne Lavin
ParticipantLooks like we were sending t the same time.
I want to circle back to the directions.
"The plugin will look for a template file with the following order:Inside a folder
mb-frontend-submissionof your child theme
Inside a foldermb-frontend-submissionof your parent theme
In the plugin’s templates folder
"
I had intended to do that once I could see it worked in the parent. But if I understand you correctly, it does not do in the templates folder in my child theme. It goes into functions.Mary Anne Lavin
ParticipantSo, just to be safe, I checked the version of Frontend I was using. It was 2.02. I was able to download the newer version from your site. So now we match. I am working in Form.php v 2.04. (NOTE: there was no notice in WordPress of a newer version to update to.)
Anyway, all that said and done, I get the same error - just now on a different line
Parse error: syntax error, unexpected 'add_action' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) in /nfs/c12/h07/mnt/220007/domains/devseek.minnesotaee.org/html/wp-content/plugins/mb-frontend-submission/src/Form.php on line 134Mary Anne Lavin
ParticipantAlso, this may have nothing to do with it, but your screen shot looks nothing like my form.php file. Here's my file lines 145 - 163
do_action( 'rwmb_frontend_before_process', $this->config ); $object_id = $this->object->save(); $this->object->post_id = $object_id; do_action( 'rwmb_frontend_after_process', $this->config, $object_id ); return $object_id; } /** * Handling deleting posts by id. */ public function delete() { if ( empty( $this->config['post_id'] ) ) { return; } do_action( 'rwmb_frontend_before_delete', $this->config ); wp_delete_post( $this->config['post_id'] ); do_action( 'rwmb_frontend_after_delete', $this->config, $this->config['post_id'] ); }Mary Anne Lavin
ParticipantI just ran phpinfo and it reports PHP Version 7.2.12. I added code to the form.php and so the line 155 on my file has the first line of the code below:
add_action( 'rwmb_frontend_after_process', function( $config, $post_id ) { if ( 'my-meta-box' === $config['mymetaboxid#'] ) { wp_mail( '[email protected]', 'New submission', 'A new post has been just submitted.' ); wp_safe_redirect( 'thank-you' ); die; } }, 10, 2 );Mary Anne Lavin
ParticipantYou were correct about the php. I had them change it to 7. But now I get this:
Parse error: syntax error, unexpected 'add_action' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) in /nfs/c12/h07/mnt/220007/domains/devseek.minnesotaee.org/html/wp-content/plugins/mb-frontend-submission/src/Form.php on line 155Mary Anne Lavin
ParticipantFYI: I was able to add Captcha V2 (The I Am Not a Robot challenge) by installing BestWebSoft's Google Captcha plugin, which can be applied to custom fields. I called the php using MB's custom HTML field and it works great - But I don't like needing another plugin. I do think MB should have some version of this built into the Frontend Submission extension.
Mary Anne Lavin
ParticipantThanks!
Mary Anne Lavin
ParticipantI wonder from current Frontend users if they are under attack from killer bots? My client is asking for something - is there a work-around for this using other code or plugins?
Mary Anne Lavin
ParticipantThanks for the video. I see the issue is with the shortcode I was using. But now I have a new problem. Adding "content" to the short code activates the datepicker and adds the page's content editor - I only want the custom fields for the custom post type(which does not support the content field)
[mb_frontend_form id="name" post_fields="title, content"]
Mary Anne Lavin
ParticipantNothing is showing with DEBUG. Inspecting the input [], it says it is a text field. But the calendar shows up on the admin side.
Mary Anne Lavin
ParticipantComing back in. Still can't get this to work. I tried every variation shown in the video
https://youtu.be/NFZE4Sxi2p4 and the values will not load. I changed themes to test; added the extension folder to my theme and registered it in functions. It has to be a stupid thing - but I cannot figure it out. -
AuthorPosts