Support

Account

Home Forums Front-end Issues 'Update' button doesn't do anything

Solving

'Update' button doesn't do anything

  • I’ve got a frontend form in a page template. This is the top line:
    <?php /* Template Name: School Logo Upload */acf_form_head(); ?>

    This is where I call the form:
    <?php acf_form($options); ?>

    I’m seeing the form just fine on the page. I only need it to upload an image and submit a text field. It is a form for admins to upload an image of their school logo and the text box is for submitting the name of the mascot.

    From the frontend form I can click to Add Image and the media library pops up and I can upload or select form the library and when I do the thumbnail shows just fine along with the delete and edit hovering round buttons.

    But when I click the “Update” button under the form, the page does nothing. How can I go about troubleshooting this to figure out how to fix it?

    Thank you for the help

  • Hi @Jacob311

    You can troubleshoot the issue by debugging the acf_form_head function found in core/api.php

    Perhaps you could include the $options you are using in the acf_form function?
    Also, are there any element in the template that we should know about? nested form tags?

  • Thank you for the reply elliot. Can you tell me how to “debug the acf_form_head function”? Also, I don’t understand how to use the $options array. I didn’t know if when they said to “just use this snippet” if that meant to use it as a template and fill in my own stuff in certain areas, or what.

    I’ve disabled all my plugins and reverted to a fresh Twenty Thirteen and I still can’t get my frontend form to work. I can see an Add Image button and Update button but the update is not working. I’m not saving the data.

    I know the backend works because I assigned this image upload field to the dashboard page of “school-logo” and when an image is loaded through that, it displays just right on my site using <img src="<?php the_field('school_logo_image'); ?>" />

    I need to be able to move many of theme options to the frontend of the site so any information is great.

  • Hi @Jacob311

    I mean no offense, but I am slightly confused that you don’t know what I mean by ‘debugging’ a function.

    The code you are writing is extremely custom and far from a one click install approach. Perhaps you need to hire a developer to look at this issue?

    Also, please read the docs thoroughly if you don’t understand what the $options do.

    Again, I am not meaning to sound rude, however, this is a developer plugin and it is a pre-requisite that you are a confident PHP developer before using it, especially creating a front end form.

    If you have any specific questions, don’t hesitate to ask.

    Thanks
    E

  • Hi @elliot,

    After following the tutorials, I’m having the same issue as Jacob, here. My front-end form is showing up fine (a single text field), but when I click to submit, nothing happens. No page reload, no redirection… just a clicking button.

    I checked the outputted form html and it looks good, as well as my my_pre_save_post() function seems correct and matches the tutorial and examples I’ve found throughout the forum here.

    I’m trying to use this form to create a new post, rather than edit a post.

    Just can’t figure out why the submit button is not working. Any ideas?

    If it helps, my form starts with:

    <form id=”post” class=”acf-form” method=”post” action=””>

    Thanks,
    Alex

  • Hi @Jacob311

    When you say I click to submit, nothing happens. No page reload, no redirection… just a clicking button., I can only think the issue is a JS one.

    Please open up your console log and attempt to submit the form. Do you recieve any JS errors?

  • Greetings, @Elliot Condon

    I’m a web designer / developer with a passion for wordpress and PHP. I’m learning new things every day and I’m lucky enough to have a job that allows me to learn as I go.

    So, I work with PHP daily but definitely wouldn’t consider myself a Guru. I love wordpress, so most of the PHP that I write is geared for it.

    All of that to say: I am having the same issue. I have read all the tutorials available on the site and have fiddled with my form, stripping it down to nothing but the bare minimum for creating a post, and am perplexed that anyone ever got this working.

    I simply get no response from the site when I click submit.

    There are no Javascript errors, nor any warnings even.

    If I leave required fields empty, the form will update to tell me that I need to fill them out, but once I do, nothing happens.

    I’m not necessarily looking for a response here, or an answer. Though, if you have one I’ll certainly listen. Mainly I am posting to say that your response to

    @Jacob311
    was shockingly rude.

    Saying “I don’t mean to be rude” does not automatically negate the fact that you’re being rude. In fact, if you have to preface anything you say with that sentence, chances are you are about to say something rude and may as well reword.

    He’s probably just an average guy working on a small project and having fun learning and exploring a new part of life, why get all pissy and suggest he hire a developer? I agree it was sort of a beginner question, but so what? If you didn’t feel like answering it, point him in the direction of some documentation that explains function variables, it’s better than coming off as a complete asshole.

    The plugin is great, I use it all the time, literally with every site I develop, it’s an invaluable addition to my arsenal of development tools. And I love it not just because it’s amazing and powerful, but because it promotes sharing good code and helping the development community as a whole become better, thus making for a more awesome web experience for everyone.

    But when I come here investigating an issue I’m having setting up a front-end form for the first time and see “gurus” treating new users like shit, it shatters that entire image.

    Get your shit together.

  • You do realize this support is completely free right? Also, I do agree with Elliot. It is rather difficult to troubleshoot frontend forms. I myself am having trouble with getting the form to go through if “http://&#8221; is in any of the fields, the form will reset (this is in ACF Pro though). They are currently working with me to solve this problem, and I really appreciate the way they handled themselves so far.

    In my opinion, this forum should be used as a last resort instead of a forum that babysits and spoonfeeds a user all the way through. There is proper documentation on how to get a form set up on this site already, and I don’t think Elliot is obligated to spoon feed the simple task of searching as well.

    This only requires basic knowledge of PHP and WordPress to get it working, but teaching that to a new user can be cumbersome. Elliot’s job is to help users fix bugs they might encounter, not teach users how to code.

    Before you go off on someone because they make a somewhat “aggressive” remark in your eyes, think about the situation first.

    As for the issue you guys might be having, are you guys on WordPress 4.0 by any chance? I noticed that in ACF Pro, the gallery and image fields wouldn’t show up if I was running WordPress 4.0. I simply downgraded and everything seemed to be working again, except the issue I have now with URLs.

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘'Update' button doesn't do anything’ is closed to new replies.