fabianlindfors
Forum Replies Created
-
Forum: Plugins
In reply to: [Advanced Forms for ACF] Submission Failed NoticeIn that case,
af/form/before_submission
might work as it’s run after validation but before any processing (so you won’t need to delete the entry later). It’s highly untested though so I can’t guarantee that it will work. If you find some bug, I’d be happy to fix it!Forum: Plugins
In reply to: [Advanced Forms for ACF] Redirection variables (or af_origin_url filter)Hey, Theo!
The best way is probably to set the
redirect
argument using https://advancedforms.github.io/filters/af/form/args/ and there you can set the URL to include whatever arguments you need.Forum: Plugins
In reply to: [Advanced Forms for ACF] Submission Failed NoticeHey, Paul!
Technically there is an undocumented action called
af/form/before_submission
from which you can callaf_add_submission_error( $message )
to add an error and stop the submission. There isn’t an easy way to do it from the actualaf/form/submission
action though.May I ask what your needs are which means the
af/form/validate
action won’t work?Forum: Plugins
In reply to: [Advanced Forms for ACF] SenderFrom my experience, there are a lot of email-related plugins that mess with the “From” header on all emails. Could you try disabling other plugins and see if that fixes the issue?
Forum: Plugins
In reply to: [Advanced Forms for ACF] SenderHi, Remco!
This is commonly caused by having some other plugin on the site which overrides the from field for all emails sent. Do you have any other plugins that might be interfering with email sending?
Forum: Reviews
In reply to: [Advanced Forms for ACF] Very good plugin based on the very good ACFThanks for the kind words, Adrian! I’m glad you enjoy Advanced Forms ??
Forum: Plugins
In reply to: [Advanced Forms for ACF] From email not usedHi, @remcorhee!
I just tested this in my local environment and the “From” setting seems to work for me. I can think of two things which might cause issues:
1. Make sure the value you entered in the from setting is either a valid email address or on the form
Name <EMAIL_ADDRESS>
.
2. If you have some plugin on your site to handle email sending, it might be overriding the from field.Could you check that? ??
Forum: Plugins
In reply to: [Advanced Forms for ACF] Display empty form again after submittingHi, @remcorhee!
Adrian’s suggestion should work. Another way is to use a snippet like the following (replace FORM_KEY with your actual form key):
function show_form_again( $form ) { // By clearing the submission object we stop the form from showing a success message AF()->submission = null; // We must return $form again as this is a filter return $form; } add_filter( 'af/form/before_render/key=FORM_KEY', 'show_form_again', 10, 1 );
This should work as long as you don’t have AJAX submissions enabled!
If you want to show a success message above, you should be able to echo the message you like from inside that filter ??
Forum: Plugins
In reply to: [Advanced Forms for ACF] Filter to prevent entry creationGreat! Glad I could help ??
Forum: Plugins
In reply to: [Advanced Forms for ACF] Filter to prevent entry creationEntry creation runs very early, at priority 1, so you’ll need your
af/form/submission
action to run at a lower priority than that.If you are using the
af/form/submission/key=FORM_KEY
action though, this won’t work as that will always run after the other one. But as the recipient thing works, I don’t think you’re doing that!Forum: Plugins
In reply to: [Advanced Forms for ACF] Filter to prevent entry creationTheoretically yes with the right priority but I would recommend adding the logic directly to the filter instead! Does that work in your case?
Forum: Plugins
In reply to: [Advanced Forms for ACF] Filter to prevent entry creationGreat! I’ve added this now, available if you grab the latest version from Github: https://github.com/advancedforms/advanced-forms/commit/3bf01af376042b3bf18d7a3deb70a2bfde45da52. Will be included in the next release also of course ??
Forum: Plugins
In reply to: [Advanced Forms for ACF] Filter to prevent entry creationHi, Paul! I’m glad you like AF.
There is no such filter at the moment but I’d be happy to add it. Would something like
af/form/entry/should_create
which you can returnfalse
from work?Forum: Plugins
In reply to: [Advanced Forms for ACF] Form Action urlHi again! Your code looks good but worth noting that you don’t need
sprintf
in your case!Regarding other fields being added, what location rule have you set for the unexpected fields in the ACF settings?
Forum: Plugins
In reply to: [Advanced Forms for ACF] Form Action urlThose are regular old WordPress filters so you should be fine adding it to your functions.php or similar!