Kevin Stover
Forum Replies Created
-
In the “email from” setting, make sure that your email address looks like: Your Name <me@email.com> rather than just: me@email.com.
Hey. The error message shows beneath the field so that users can easily identify the field that caused the error. If you want to modify that behavior, you could do so with some custom code and without touching the actual code of the plugin. If you are interested in that, let me know and I’ll try to point you in the right direction.
The email checking on empty is a good idea and I’ll see about adding an improved check to a future version.
Thanks!
I’ll see if I can recreate this in my local environment. The fields should stay populated.
If you are using version 2.2.0, this should be taken care of.
Forum: Plugins
In reply to: [Ninja Forms - The Contact Form Builder That Grows With You] Changed domainsIf you go to the “Form Settings” tab and change the “Landing Page” to “None”, then press “Save Settings.” That should clear that setting out.
Forum: Fixing WordPress
In reply to: Form for different postsDepending upon your familiarity with PHP, the programmatic method presented above would certainly work. I was going to recommend using a custom page template to either modify the form on the fly or select a particular form. You can do either with Ninja Forms quite easily if you don’t mind doing some custom coding.
I would slightly modify the method so that in your custom_template file instead of creating a submit button, you create a link to the form with a querystring attached to it that would represent the Post ID of the particular post or page. Something like: “http://www.mysite.com/form-page/?referrer=3” where the 3 is the ID of the post your link is on. You can do this quite easily using get_permalink( POST ID). And the Post ID can be appended to the url that is returned using add_query_arg(). Then, in Ninja Forms, you can select a form or show/hide/modify the form output based upon that Post ID.
In your template file, as was mentioned above, you can look at the Post ID you get and decide which form should be displayed. If you are using Ninja Forms, you can use the template function ninja_forms_display_form( FORM_ID ); to pull in the form you want depending upon what the previous page was. This will save you the hassle of having to use shortcodes and modifying the form ID attribute in the shortcode.
Of course, if you aren’t very comfortable using PHP, that can all sound like a rather daunting task. If you need this to be up quickly, I might recommend implementing the non-programmatic way and then modifying it once there isn’t a time constraint.
If you need more direction than that, just let me know and I’ll see if I can help.
Hey Henk,
I have a fix for this that will be released on Monday. It is caused by your version of PHP being lower than 5.3.
You could add something like that as a custom field, but you’ll have to handle all the processing.
You can find more information about adding custom field types here:
http://wpninjas.com/ninja-forms/docs/capturing-the-ip-address-of-a-form-submitter/You just add the Anti-Spam field and fill in a question and answer.
Hey Henk,
Thanks for the heads up. I’ll look into it and see if I can reproduce it.
Forum: Plugins
In reply to: [Ninja Forms - The Contact Form Builder That Grows With You] Dynamic Lists?Just wanted to post two links that I’ve put together since this question was asked:
This is an example of registering a new custom field type for capturing user IP addresses: http://wpninjas.com/ninja-forms/docs/capturing-the-ip-address-of-a-form-submitter/
This is a document that does a better job of explaining the extra field values I mentioned a few posts above: http://wpninjas.com/ninja-forms/docs/using-extra-field-values/
Hey Manning,
They are a custom post type, so by default WordPress handles the output just like a regular post. When a user submits the “Novel Review” form on that website, it becomes a draft and the demoadmin can approve it to be published. If it is published, it goes into that list.
There are lots of possible editing rules that can be setup, but the default on the demo site is that subscribers (i.e. demouser) can edit novel submissions that they have made. So, if you login to the demo site as demouser, you can edit the “Foundation” novel review by going to Novel Reviews, clicking on Foundation, and then clicking “Edit.” In the particular example on the demo site, we don’t have image uploads, but if we had put one of those in there, the user would be able to upload a new one when editing the novel review.
I hope that helps.
I’ve tried your code snippet on my local host and can’t find any problems with it. It shouldn’t affect anything, but what version of Ninja Forms are you using?
Forum: Plugins
In reply to: [Ninja Forms - The Contact Form Builder That Grows With You] Dynamic Lists?Ha! Thanks for the kind words. I apologize that you had to write here instead of just looking at some docs. We are working on it, but sadly, docs have the lowest priority behind client work and plugin support.
You actually don’t need the “Edit” function unless you have settings that you want to save on the backend. Those are there so that you can add settings to the back-end editor. If your front-end display is the same every time, you don’t need an edit function or “edit_options.”
Again, if you find that you need some hooks or filters that aren’t there, we’re more than happy to listen to developers! 🙂
Forum: Plugins
In reply to: [Ninja Forms - The Contact Form Builder That Grows With You] Dynamic Lists?Hey,
In the code above, you’re adding the Woo products as a select option on the back-end. The “edit_options” array is a collection of back-end, field editing settings. The code as you have it at the moment pulls a list of products into a select element, but it’s a select dropdown on the back-end field editor. That select option can only have one value, so in the display function, you’re seeing that one value.
If you want to get a list of all the products and output them as a select list, you’ll need to move your options generation code down into your display function. Something like:
function select_woo_products_display( $field_id, $data ){ // Get the default_value if( isset( $data['default_value'] ) ){ $default_value = $data['default_value']; }else{ $default_value = ''; } // should output the list within here // get a list of woo products $woo_args = array ( 'post_type' => 'product', 'posts_per_page' => 5 ); $woo_products = get_posts($woo_args); $woo_products_select = array(); foreach($woo_products as $woo_product) { $woo_products_select_item = array( 'name' => $woo_product->post_title, 'value' => 'product-'. $woo_product->ID .'-'. $woo_product->post_name ); array_push($woo_products_select, $woo_products_select_item); } // Now that $woo_products_select is populated with the options, output a select box for the user to select from. <select name="ninja_forms_field_<?php echo $field_id;?>"> <?php // Loop through your products and output the options here. ?> </select> // just outputs the first item in the list - how do I get all of the items? }I hope that helps. If doesn’t, just let me know.