This plugin seems to do exactly what I need but as soon as I activate it my front end forms stop working: when I press submit it does the normal acf validation for empty fields but when all data is there the submit button does nothing. This is both for editing and posting from the front-end. Back-end seems to be ok.
I’m using this kind of method for my front end forms: http://www.advancedcustomfields.com/resources/functions/acf_form/?version=4
Any help would be appreciated.
I haven’t tested this at all on the front end using
acf_form()so my initial guess is that either something isn’t loading because it isn’t
is_admin()or that the validation is failing but the CSS selectors to show the errors aren’t working.
Can you try using the Developer Tools in Chrome on the network tab to see if there is a request made to
wp-ajax.phpwith the field info when you try to edit/post? You could also try setting the constant
Many thanks for replying.
I’m sure it’s not a validation problem and I don’t even set the field type to validation field. The problem starts as soon as I turn the plugin on: the submit button for my post/edit forms stops working apart from the default js validation (if I leave the fields empty the default js validation will still work).
Chrome’s DT don’t capture anything when I click submit and I’ve also got all WP debugging on and no errors popping up.
But it could be a problem with my setup as I’m using it a custom theme that I’m building and as I’m a noob it is possible that it might be conflicting with some function.
Anyway if anyone figures it out I would love to hear about it as this plugin would be quite useful for my site.
If you’re interested I can give you a copy of the dev code so you can give it a try, it will require an additional constant
ACF_VF_FRONTENDto be defined and set to
Hey that would be great, if you could link to the dev code or email it to email@example.com I would really appreciate it. I’ll let you know if it works and if not I’ll try to make it work, I’m no php wizard but I’m learning and this will be a good challenge I guess 🙂
Sorry for the delay. I had some dental work done and have been taking painkillers the past few days, so not much programming. There are some factors I didn’t consider when I did the POC even though it “works”, primarily the DOM element ID’s, so the is still a bit more to do. I’ll let you know once it’s ready to demo.
Many thanks for looking into this and If there’s anything I can help you with let me know.
Sorry – now my parents are in town so I haven’t had a chance to finish testing, plus I’m trying to make some of the global settings easier to manage (options page vs constants).
If you want to give the dev version a try you can download it from here, then add
define( 'ACF_VF_FRONTEND', true );to your
wp-config.php. It would be great if you could let me know either way if it works for you or not.
Hey, many thanks for sharing the dev version, I’m a bit busy myself at the moment but I’ll give it a try as soon as I can and will report on results.
If you haven’t downloaded it, I just put an updated version at the same link if you care to give it a try. The global settings have now been moved to a settings page in the Admin under “Custom Fields > Validated Field”. You want to check the box to enable validation on the front end and save.
Hey sorry I’ve been quite busy lately and didn’t get the chance to test it yet, I will try it tonight and report back.
Hey man, you’re the best! Your awesome plugin is now working with my front end forms 🙂
I found a few minor bugs though:
1 – the failed validation warning red borders have disappeared for any fields which are not using the ‘validated field’ type from your plugin; And it only works for fields using the ‘validated field’ type if the user has written down something. If the field is empty only the message pops up at the top;
2 – The custom error messages for your validated fields are not displaying properly. What I see instead is some weird red mark + a red arrow shape (“class = bit” rings a bell?) Even if custom error message is empty I get this arrow shape and red mark.
3 – If I type something into a validated field type with a custom php function and it doesn’t ‘return true’ (validated) the validation error message appears twice on top:
“Validation Failed. One or more fields below are required.
Validation Failed. See errors below.”
And no custom errors messages show as per point no.2
I should have some time this week and will try and have a go at fixing these but if you happen to know the cause of any of the issues please let me know.
Thanks a lot for all your help mate!
Hi doublesharp. I ran in the same issue as posted by mickfilipe. There’s a stable update planed for the next days?
Soon, but it might be another week. Currently trying to launch the business that this plugin was originally written for (but not using the front-end piece so it’s not blocking) and at the same time clearing brush from some rural land – high tech/low tech diversification.
Sorry for the holdup, I’m aiming to have a bug free version early next week, but hey, at least it’s free 😛
Hi, any chances i could get the dev files too? I have the same problem, and I need it for some work with a client. Wouldn’t mind if there’s stuff to change or modify in the files.
- The topic ‘front end forms stop working when plugin is activated’ is closed to new replies.