Kevin Stover
Forum Replies Created
-
Forum: Plugins
In reply to: [Ninja Forms - The Contact Form Builder That Grows With You] Dynamic Lists?Sigh. If I could remember to type my whole message before I click “Post,” that would be awesome. Anyway, I was just going to say that to change the pre-populated value, you’ll want to modify $data[‘data’][‘default_value’].
Forum: Plugins
In reply to: [Ninja Forms - The Contact Form Builder That Grows With You] Dynamic Lists?No problem! Glad I could help. If, in your trials, you find that you need a specific hook or filter and can’t find it, let me know and we’ll try to throw it in there. I know that I can’t come up with every use-case and hook or filter that might be needed.
Yup. If you are pre-populating the data, you’ll definitely need the filter.
Forum: Plugins
In reply to: [Ninja Forms - The Contact Form Builder That Grows With You] Dynamic Lists?Ooops, forgot to mention that the ‘ninja_forms_field’ filter is sent $data (which is the thing being filtered) and $field_id (which is the ID of the field currently being displayed). Apologies for forgetting to throw that in there.
Forum: Plugins
In reply to: [Ninja Forms - The Contact Form Builder That Grows With You] Dynamic Lists?Hey,
You can absolutely do that. We have tried to make Ninja Forms as extensible and flexible as possible. Almost every aspect of display, admin, and processing can be modified without ever touching the core plugin code.
There are two ways you could handle your use case: the first would be to create a list field and then filter the options values before it is displayed. To do this, you would use the ninja_forms_field WordPress filter. This filter is sent an array named $data that has every piece of information required to display the field. The list options are stored inside this array like: $data[‘data’][‘list’][‘options’]. The options array should look like this: array( ‘name’ => ‘Option 1’, ‘value’ => ‘option1’). The value is optional, and if it’s not sent the ‘name’ will be used for the ‘value’ as well. In this approach you would create an empty list field in the back-end, and then you would check the field ID in your filter to make sure you only changed the empty field. We are still working on documentation for the plugin, so I apologize that I can’t just point you to a doc with an example.
The second method is to register your own custom field. This field could then be re-used in any forms you wanted; you could even add some options to the backend to make it even more dynamic. I think if I were doing it, I would use this method. To register a new field, you create an array with some field options, a display function, back-end field options (if you need them), custom processing function(s) (if you need them), and Ninja Forms takes care of the rest.
There is a doc related to this: http://wpninjas.com/ninja-forms/docs/ninja_forms_register_field-2/
If you want more examples, all of the fields within ninja-forms/includes/fields/ are added with this method. The field will then behave like any other Ninja Forms field: it will get emailed, saved in the submission database, etc.
I hope that helps. If you have any other questions, please let me know.
The only thing I see is that the function is passed the $form_id as a variable. so your function would become ninja_forms_example( $form_id ). I don’t think that would cause what you’re seeing, though.
It looks ok. Are you sure that the hooks aren’t firing after you click the submit button?
The pre_process, process, and post_process hooks only fire when the form has been submitted. To fully test the echoing, you’ll need to disable ajax submissions, replace the echo in your code above, and submit your form. This will reload the page (because ajax will be turned off) and allow the processing hooks to fire.
Hey. If you want to modify field values, you’ll want to use the ninja_forms_pre_process hook. The ninja_forms_post_process hook fires after all the processing has been completed.
Forum: Plugins
In reply to: [Ninja Forms - The Contact Form Builder That Grows With You] Textarea LabelJust wanted to let you know that I have fixed this bug and will be rolling the fix into version 2.1.6, an update I’ll release in about 2 days.
Thanks for the heads up!
Forum: Plugins
In reply to: [Ninja Forms - The Contact Form Builder That Grows With You] How to translateThat was a commit error on our part in the previous versions. It’s been re-added as of version 2.1.5.
It sounds like a JavaScript problem with the plugin you mentioned. Take a look at this post and see if it helps you at all: http://wpninjas.com/troubleshooting-javascript-and-jquery-problems-with-wordpress-plugins-and-themes/
Forum: Plugins
In reply to: [Ninja Forms - The Contact Form Builder That Grows With You] Textarea LabelHey J,
I’ll take a look at it and see if I can reproduce it.I’ll get back to you when I have some idea of what’s going on.
Good. Thanks for the info.
Weird. I don’t think I’ve seen that before. It’s not weird that deactivating or deleting the plugin leaves your forms, however, because Ninja Forms keeps all the forms in a custom database table in the WordPress database.
Hey Rebecca,
If you’ve used the same code-base on another host and it worked normally, it has to be the GoDaddy that is causing the problem. I’ve never used them for hosting, so I’m not sure what their email policies are. I really don’t know why it would send user emails but not administrator emails, both processes are handled using the WordPress wp_mail() function.
I am sorry that I can’t be of any more help, but if you hear something back from GoDaddy, please let me know so that I can help other users.
Hey Rebecca,
There are a couple of things I’d suggest and perhaps a question or two. The first is to remove all the administrator email addresses, save with none and try re-adding them. Sometimes, this can clear up the problem. The second is to put a personal email address into the “From” address and see if the administrators are receiving it.
Now for the questions. Are you sure that they aren’t going into your spam or junk folder? Have you used the administrator email successfully on a different host or with a different version of the plugin? In other words, is this a recent problem, or has it been around for a while?
I’ll have some time free later this week to take a look at it if the two steps above don’t do anything.