Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 25 total)
  • Author
    Posts
  • in reply to: AJAX submission no longer redirects after AIO update #41560
    Stephen C.Stephen C.
    Participant

    I finally figured it out. At some point you guys made it so 'ajax' is always false if 'edit' is true. I don't really get why you did that. For my site, the users can edit their submissions and ajax still needs to be true. So, I had to edit the source code to get it to work. I know it's not ideal, but it's the only way to get it to work as needed.

    in reply to: AJAX submission no longer redirects after AIO update #40604
    Stephen C.Stephen C.
    Participant

    Not sure why the new version always sets the ajax value in the javascript created by localize_data to "false" on my site, but I ended up having to revert back to the previous version of Frontend Submisssion, because that version works for me. I currently don't have the time to fully investigate the issue.

    Also, two identical lines of javascript are created in <script id='mbfs-js-extra'> (the localized data). Not sure what's going on there, either, but that obviously wouldn't cause any problems.

    in reply to: AJAX submission no longer redirects after AIO update #40549
    Stephen C.Stephen C.
    Participant

    It appears that in Form.php in the following function

    	private function enqueue() {
    		wp_enqueue_style( 'mbfs-form', MBFS_URL . 'assets/form.css', '', MBFS_VER );
    		wp_enqueue_script( 'mbfs', MBFS_URL . 'assets/frontend-submission.js', array( 'jquery' ), MBFS_VER, true );
    
    		$this->localize_data = array_merge( $this->localize_data, [
    			'ajaxUrl'        => admin_url( 'admin-ajax.php' ),
    			'nonce'          => wp_create_nonce( 'ajax_nonce' ),
    			'ajax'           => $this->config['ajax'],
    			'redirect'       => $this->config['redirect'],
    			'confirm_delete' => __( 'Are you sure to delete this post?', 'mb-frontend-submission' ),
    		] );
    	}

    'ajax' is always getting set to false, regardless of what the shortcode value is for 'ajax'.

    in reply to: AJAX submission no longer redirects after AIO update #40547
    Stephen C.Stephen C.
    Participant

    Actually, it looks like the form isn't being submitted via ajax, even though the shortcode is set to submit via ajax.

    Stephen C.Stephen C.
    Participant

    Fantastic! Works great. Thanks, you really helped me out a lot!

    in reply to: Change password form shortcode doesn't work #36846
    Stephen C.Stephen C.
    Participant

    Still not fixed yet? This is kind of an important issue and it has been about 3 weeks since this thread had been started.

    in reply to: Only Allow Post Author To Edit Own Post #35846
    Stephen C.Stephen C.
    Participant

    Users can only edit their own posts. If someone other than the author tries to edit a post, their get a message that says "You are not allowed to edit this post." Admins can edit any post, though, so don't test using your admin account.

    Stephen C.Stephen C.
    Participant

    Nevermind. It wasn't a problem at all. I was just spacing out. You can delete this thread.

    Stephen C.Stephen C.
    Participant

    Thanks for the quick update. Looks like all is good now.

    Stephen C.Stephen C.
    Participant

    Great, thanks!

    in reply to: A space will pass required field validation #35647
    Stephen C.Stephen C.
    Participant

    I already have to modify the source code before updating each time. I have had to make several changes to fix issues with MB to make it work as desired on my site, like adding a parameter to allow me to set the autocomplete attribute (autocomplete="off") on the frontend submission and user profile forms to prevent browser caching of form field values when needed, setting an actual form id instead of just using the a comma separated list of meta box ids as the form id for frontend submission forms, code that allows for reinitializing image fields so forms can be completely reset to their original state without having to reload them (useful when displaying a form in a modal, such as an avatar select/upload, and the user cancels the modal instead of submitting), modifying media.js to use a different trigger to change images instead of using .rwmb-image-overlay so that a button can be used in addition to the overlay (users often don't get that clicking the overlay will allow them to change images), and a few other things.

    in reply to: A space will pass required field validation #35624
    Stephen C.Stephen C.
    Participant

    I want to use the javascript validation first, before submitting anything to the server. I fixed the issue by unminifying validation.min.js and adding a bit of code immediately after this.$form.on("submit", function () { to trim the values before the validator is called. Now it works as it really should.

    in reply to: Reinitialize conditional logic javascript after page load? #34038
    Stephen C.Stephen C.
    Participant

    I couldn't seem to get it to work. It might be because the script uses selector caching or I might be just doing something wrong. No big deal. The conditional I'm using is pretty simple, so it was easy to write a separate script to deal with the clones for that particular situation. Digging through the clone.js code, I did find the 'after_clone' event that's triggered, which makes it really easy to run code after a clone has been created. That's something you might want to include in your documentation somewhere. I'm sure others would find it useful.

    in reply to: autocomplete="off" option? #33028
    Stephen C.Stephen C.
    Participant

    I should say, "edit the Meta Box Frontend Submission source code", not the core Meta Box source code.

    in reply to: autocomplete="off" option? #33026
    Stephen C.Stephen C.
    Participant

    Nope, scratch that. I thought it was working, but it doesn't because the first form field is a hidden field created by Meta Box. There's no way to add a field before it.

    I guess I'll have to edit the Meta Box source code (Form.php) and just remember to edit it every time I update Meta Box (or just not update Meta Box unless it's a critical update). That seems to be the only way to prevent the browser from filling in form values with cached data.

Viewing 15 posts - 1 through 15 (of 25 total)