deeveedee
Forum Replies Created
-
Forum: Plugins
In reply to: [Ninja Forms - The Contact Form Builder That Grows With You] ReCAPTChaI implemented recaptcha after following the directions here:
https://ninjaforms.com/docs/plugin-settings/
The reCAPTCHA Page link in the Ninja Forms link above takes you here:
https://www.google.com/recaptcha/intro/index.html
For what it’s worth, I experimented with reCAPTCHA and then ended up removing it from my forms for the reasons stated here:
https://ninjaforms.com/google-recaptcha/
- This reply was modified 7 years, 5 months ago by deeveedee.
Form import/export is now Ninja Forms issue #3151. Not sure if the bug reported above will be part of this fix.
Confirmed bug. Ninja Forms Issue #3149.
After learning more about Ninja Forms hidden ‘Honey Pot,’ I have decided to remove Recaptch from my forms. According to Ninja Forms, bot detection with the ‘Honey Pot’ is sufficient for most form implementation – I agree. I’ll revisit Recaptcha if necessary.
Leaving this thread ‘unresolved’ since the Recaptcha display issue still exists if Recaptcha is used.
Marking this as resolved, since I was able to find a way to achieve the desired result with a custom
ninja_forms_run_action_settings
filter. I think Ninja Forms should provide an easier way to display real-time results from the WP Hook Action in the Success Message.Custom element classes do work. I must have crafted my CSS incorrectly. Once I retested, all was working fine.
If you want to create CSS to modify the style of your Ninja Forms fields, define the container and element classes when you create the field and then reference the container and element classes in your CSS. Very cool.
The portion of the log where the backup “froze” is below. Clearing the cache immediately unfroze the backup and it continued to completion. Directories have been removed from this log.
0917.573 (3) Scheduling a resumption (4) after 300 seconds (1508084735) in case this run gets aborted 0917.694 (3) Checking if we have a zip executable available 0917.699 (3) Zip engine: found/will use a binary zip: /usr/bin/zip 0917.700 (3) Creation of backups of directories: had begun; will resume 0917.701 (3) Beginning creation of dump of plugins (split every: 400 MB) 0917.711 (3) File exists (xxxxxx_230310d0c27d-plugins.zip.tmp), but was apparently not modified within the last 30 seconds, so we assume that any previous run has now terminated (time_mod=1508084258, time_now=1508084436, diff=178) 0918.743 (3) xxxxxx_230310d0c27d-plugins.zip.tmp: Zip file already exists, with 5552 files
**** Backup frozen. Cleared Cache – Backup resumed ****
0922.009 (3) Total entities for the zip file: 856 directories, 5552 files (0 skipped as non-modified), 85.2 MB 0922.013 (3) Zip: xxxxxxx_230310d0c27d-plugins.zip.tmp: 100 files added (on-disk size: 32322.8 KB) 0922.014 (3) Zip: xxxxxxx_230310d0c27d-plugins.zip.tmp: 200 files added (on-disk size: 32322.8 KB) 0922.016 (3) Zip: xxxxxxx_230310d0c27d-plugins.zip.tmp: 300 files added (on-disk size: 32322.8 KB) ...
If I don’t clear the cache, the backup does not resume on its own (although I did see multiple backup wait and restart messages). I waited for what seemed like a long time, but I wasn’t counting the minutes. What I observed is that clearing the cache unfroze the backup which then finished immediately.
Could this have something to do with limited memory and I/O resources. My PHP memory is 512M and I/O is limited in the shared hosting environment.
Or possibly could clearing the cache free memory that is then available for the backup?
- This reply was modified 7 years, 5 months ago by deeveedee.
I observed the problem again today ( after adding
define('COMET_CACHE_ALLOWED', FALSE);
). I cleared Comet Cache and will continue to test. Note that the logo display problem (described in my first post above) is “fixed” after clearing Comet Cache. I’ll wait to see if the problem returns again.@dnutbourne – I am using the free version of Comet Cache, so I believe that caching is disabled for logged in users (not an option for the free version). Very good question. Makes me wonder why clicking ‘Clear Cache’ works the way it does.
Let me know if you need any additional information.
I have added the
define
statement to the plugin main root file as you instructed. I will monitor the site to see if this fixes the problem.Is this define statement going to affect the performance of my website? If so, is there a conditional that I can specify (e.g.
if (something is true) { define('COMET_CACHE_ALLOWED', FALSE); }
Thank you for your help.
I’m new to Ninja Forms, but will try to help. Looking at the available processing hooks might help you to understand the process flow: https://developer.ninjaforms.com/codex/submission-processing-hooks/
My understanding of the form is that the “saving” depends on your form’s action(s). Forms have settings and fields. When the user enters data in the form, the data is validated (to confirm presence of required fields and compliance with restrictions (e.g. input masks) and then the actions are processed. You determine the actions.
For example, I have a form whose only action is a Success Message. I added a filter (a
ninja_forms_run_action_settings
filter described in the link I suggested above) that does my processing and reports result status to the user. For me, this happened to be the best way to accomplish my intended result.Form data and settings are passed to each processing stage via the filters and actions. The way in which you “intercept” data and settings at each stage depends on the filter/action you select and the data/settings that are passed to it.
In order to create a custom Success Message that is unique to each custom Action, I removed the WP Hook from my form (leaving only the Success Message Action as the single Action in my form) and moved my custom Action functinoality (formerly in the WP Hook callback) to a
ninja_forms_run_action_settings
filter. Now, after form submission, my action processing filter performs my custom Action and modifies the Success Message’s$action_settings['success_msg']
before returning$action_settings
.Using this technique, I can have a Success Message that displays the unique result of my custom Action. For example, my custom Action (now performed in the filter) submits the form data to an external helpdesk database which returns a helpdesk ticket number. Before exiting, the filter adds the helpdesk ticket number to the success message to be displayed to the user.
Note that my custom Action which I moved to the filter needs read-only access to the form field values. Since I don’t know enough (yet) about Ninja Forms to directly access form data in the filter, my filter extracts the form field values from
$action_settings['email_message']
. This is the only way I could find to get the form field values using the data provided to the filter.@klhall1987 – Thank you for the reply. You have helped me to better understand your documentation. I did correctly define my custom merge tag class in its own PHP file, but I didn’t create a separate plugin file for the merge tag. I specified the
add_action( 'ninja_forms_loaded', 'my_register_merge_tags' );
in my functions.php file.I have never developed my own plugin which is why I didn’t understand this from your documentation. If I’m correct in understand you and that a custom merge tag needs to be its own plugin, that is indeed the problem with my implementation. Thank you for your help.
I will take your advice and post my question in the Developer Slack Community. Thank you.
After further testing (after implementing the ‘nf_init’ bug fix above), I’m still not certain that Ninja Forms does what I need. I have a form that implements a custom action. The custom action produces a numeric value that I want to display in the success message. Is this possible with Ninja Forms?
Details:
I am attempting to use Ninja Forms to submit customer requests to a helpdesk database that is independent of my WordPress website. I am able to hook ninja_forms_processing with my own custom callback to submit the form data to the helpdesk database. The result of my custom call back is a numeric helpdesk ticket number. Separately, I have implemented a merge tag that displays custom information in the success message. I would like to pass the ticket number resulting from the custom call back to the merge tag displayed in the success message. However, this does not seem possible given that the return value from the custom action must by VOID.Any suggestions?