Discussion on Gravity Forms Post Listing Field

nathanfranklinau

nathanfranklinau supports this item

Supported

60 comments found.

Hello, does this plugin work much like adding the prepopulate function? In other words, may it be used to add products in addition to posts?

okay thanks for clarifying so quickly! I would need multi-select at this stage in the game but I look forward to when the update comes out. Best of luck!

Cheers :) I will send you a message when I add the feature in. :)

Hi MelanieThomasAAA. Guess what ?! I have decided to add multi select support into the plugin. If you purchase it, simply just update the plugin and the support will be there. :)

Hi Nathan,

this looks interesting but I’m having trouble picturing why I would use it. I’d love to know some use cases where it would come in handy so I can keep it in mind. I’m sure this would help with your marketing also :)

cheers

Hi soulnecta, thanks for your comment. There are literally hundreds of possible uses that you can use this field for, but it really depends on the project you are working on. I have updated the description with a couple of examples to help get you started :)

Hi there. This looks like an interesting GF plugin/add-on. Is it possible to use the new field in conjunction with the post content template feature in GF? Let me explain. Let’s say someone has a series of posts for storing particular types of content. Would it be possible with your plugin/add-on: (1) to create a number of “post listing” fields in a form from which the user could select a number of different pre-existing posts; (2) set up the form to generate a new post (standard GF functionality); and (3) use the post content template feature to populate that new post with (among other things) the content of the posts that the user has selected from the “post listing” fields in the form. If this is possible, would the post titles and body content be replicated in the new post or only the body content? (It’d be great if the user could select whether titles and body content or only body content is replicated in the new post). Many thanks.

Thanks. Do you have a rough idea what it would cost? And could you provide as a plugin rather than a series of changes to a functions.php file so it’s theme agnostic? Thanks.

Hi rnzde, I would imagine you would be looking at around a couple of hundred dollars.Let me know if you are interested :)

Hi Nathan. Sorry for the delay in getting back to you. Yes, I’m keen to proceed with this please. What email address can I get you on please? Thanks. (You’ll see below that I’ve found a plugin conflict; would be great if we could that resolved please.)

P.S. I appreciate you giving this some thought. Thanks.

My pleasure :)

Hi again Nathan. I’ve purchased and installed the plugin now and see how useful it can be, especially with the multi-select option. I’ve noticed that there’s a conflict though between this plugin and the really useful Gravity Forms WYSIWYG plugin: http://wordpress.org/plugins/gravity-forms-wysiwyg/ Do you think it’d be possible to resolve that conflict please? Thanks for your help. Richard.

Sorry, I should have given more info before. When the Gravity Forms WYSIWYG plugin is not activated, your plugin works like a dream: http://grab.by/v1wY When the Gravity Forms WYSIWYG plugin is activated, the drop down field stops working: http://grab.by/v1x8 Hope this helps. Richard.

P.S. You may not have seen it, but I responded to your earlier comment above re a bit of development work. Thanks.

It seems that plugin the overriding the dropdown that is being generated. It looks as though you can change add_action( “gform_field_input”, array($this, “gform_field_input”), 10, 5); to be add_action( “gform_field_input”, array($this, “gform_field_input”), 12, 5); around line 23. I will include this in the next update to the plugin.

Awesome. Thanks so much.

Hi Nathan,

I’m looking for a way to filter my Custom Post Type (Cities) by Taxonomy1 (States) and Taxonomy2 (availability).

Can your plugin help me with this?

Hi waiosolucoes, I have now added this into the plugin, you add the following code into your functions.php file to customise the post query:

add_filter("gfpl_post_args", "theme_gfpl_post_args", 10, 5); function theme_gfpl_post_args($args, $post_type, $meta_key, $group_by_taxonomy, $field) { $args["tax_query"] = array( array( "taxonomy" => "States", "field" => "slug", "terms" => array("nsw","vic","wa","tas") ), array( "taxonomy" => "availability", "field" => "slug", "terms" => array("now") ), ); return $args; }

It works, thanks!

great! let me know if you have any issues.

Hi Nathan

Just wondering whether you’re interested in proceeding with the paid work mentioned above?

Cheers Richard

Hi Richard. Leave it with me for today. I’ll get back to you with a definite yes or no. Need to make sure I have the time. You can email me directly if you like @ me@nathanfranklin.com.au.

Hi Richard. I will be able to take on this work. Could you email me directly so I have your details and we can go from there. Thanks.

Like others here, this plugin looks awesome but I’m having trouble understanding what it does exactly.

Could you perhaps take a quick video of a typical scenario of how it can be used?

Also, we’re in desperate need of a way to add new taxonomies when submitting a form, not just choosing from the existing one’s available. In other words, in the Taxonomy called “Fruit”, we have “banana”, “apple”, “orange”, and “peach”. But we want the person submitting the form to be able to add more fruit. Like letting them add something that doesn’t already exist in the list.

Any way this plugin can help with that?

Thanks!

Hi dsgndvlp, the plugin really shines when using custom post types. A custom post type can be used to store literally whatever you want, so this plugin is about linking into those different data types and dynamically displaying it in your form as a selectable value. For example, I have a custom post type on one of my clients websites that contains job listings. The form I created is an application form that they can select the position they are applying for. Nathan

Unfortunately, the plugin won’t help with custom taxonomies. If you like send an email to me@nathanfranklin.com.au and I may be able to do some freelance work for you to help you achieve your goal.

hi, i dont know if your plugin makes something like this: for some emails, i want to respond ‘personali’, using an specific custom html page or formated response (can be templated), and the ‘support’ person can add some text and a code inside this custom respond. im clear? thanks.

Hi marcelomgerais, Unfortunately this is not possible with the post listing plugin. The post listing will generate a dropdown list allows user filling out the form to select one of the posts in the drop down. This value is then included in the form submission.

Hi all. I just wanted to say that Nathan does awesome work. He’s done some freelance work for me and it was bang on for a reasonable cost. Thanks Nathan.

Thanks Richard :)

Pre-purchase question

This sounds like what I’m looking for. I want to collect submissions from people that will show up on the backend as posts in draft mode. Does that sound like one of the potential uses?

Thanks

Hi armandodavila, No this field will grab a list of posts in the backend and show them to the user allowing them to select one or more. This is really useful if you use custom post types. The functionality you are looking for is already in GF by using the Post Title & Post Body field. :)

Hi there,

I may have slightly misunderstood but could you clarify;

Just as users can fill out a form on the front end to create a draft of a post ready for moderation, does this plugin afford them the opportunity of selecting from a list of posts and editing said post?

And furthermore if the above is true, will it be possible to limit the options to ensure the user only has access to posts they have previously submitted.

Thanks

HI TimmyD, This field is designed to select from a list of existing posts in your WordPress. You can’t edit those posts unfortunately. It was designed as a way to allow the user to select dynamic data from WordPress and works particularly well with custom post types.

For example, I am using it for one of my clients as a job application field. I have a custom post type called Jobs and a form called a Job Application Form. When the user fills out the Job Application Form, they can select the ‘Job’ they are applying for by selecting one of the ‘Posts’ from the drop down list of the Post Listing Field. This information is then submitted back to the admin.

Hope this clears things up.

Nathan

This works well for one field, but it appears you can’t use it more than once per form. Is that right?

Never mind, it does work. I had not setup the other fields correctly.

Hi

I want to show a list of custom posts but only where the author of the post is the same user who is filling out the gravity form. How would I do this?

Also, is there a way to add a further condition, in addition to the one above, to only display records based on the value of a custom field?

Thanks

Hi oakland, there is a filter that you can hook into called gfpl_post_args which will allow you to change the arguments of the post query.

Although this is not tested, it should work ok. Let me know if you have any problems with it. (You can place this inside your functions.php file in your theme)

Replace ‘css-class-for-specific-pl-field-to-target’ with a value you have entered in the cssClass field for the field you are targeting.

add_filter("gfpl_post_args", "theme_pl_args", 10, 5); function theme_pl_args($args, $post_type, $meta_key, $group_by_taxonomy, $field) { if(strpos($field["cssClass"], "css-class-for-specific-pl-field-to-target") !== false) { $args["author"] = get_current_user_id(); } return $args; }

Also, You can use this same function to add a meta_query too. See get_posts() in the WordPress Codex for more info.

I’ll give that a try, thanks.

Hi Nathan,

How can I restrict the posts listed to a certain category?

Many thanks.

Hi again,

I’m using the following:

add_filter(‘gfpl_post_args’, ‘theme_custom_gfpl_post_args’, 10, 5); function theme_custom_gfpl_post_args($args, $post_type, $meta_key, $group_by_taxonomy, $field) { $args[“category__in”] = array(5, 6); return $args; }

but it’s still throwing up all categories – what am I getting wrong?

Thanks,

Jon.

Hi Jon,

Apologies for the delay. I set up a test with the code you provided and it is working for me.

What version of the plugin do you have? It may need to be updated.

Thanks.

Nathan

aha! Fixed :o) The copy paste was inserting the wrong type of quotemarks. All fixed now and working – thank you mate :)

How would I take a post category name selection from the first page and then limit the post listing field on the next page with that category. Would you be able to provide some guidance for this?

Thanks!

Hey! This code looks correct. What is it that you are trying to achieve?

I want the first set of fields to only show the category selected from input 3. This does work. The second if statement I want the second set of fields to only show the category selected from input 12. This does not work and still shows the category selected from input 3. If I switch the first ‘terms’ to input 12, it does work but produces the same issue, everything is filtered to the category from 12. I just can’t get them both to work in the same form.

Thanks for looking at this!

Hi, I would try using $args like this:

$args["tax_query"] = array( array( ... ) ); return $args;

At the moment, with your code, you are overwriting all the other query params that are generated with the plugin. This may be causing your issue.

Let me know how you go.

Thanks for great plugin

Hi, thanks for the plugin which has saved me some time. It has worked well other than a few errors.

I have WP_DEBUG turned on and when I’m not using the taxonomy or meta fields I get a couple of ‘Undefined index’ errors.

It might be a worth turning on debugging to review any errors you find.

Hey! Thanks for the heads up. I’ll look into it and get an update out there as soon as possible.

Good day. This plugin is not what I expected. I am looking for a way to select a specific custom post type and have gravity forms, upon submittal, create a new post of this post type?

It doesn’t seem as though this is possible?

Thanks.

Hi Maxidigi, Unfortunately this plugin is not what you are looking for.

This might be what you are looking for: https://wordpress.org/plugins/gravity-forms-custom-post-types/

Also Gravity Forms has built in ability to create posts when you submit your form.

Nathan

Hi,

Pre sales question

Can i select three posts, read a meta value of each post and perform a calculation from these three post.

Value then to be added to all three posts.

Thanks

Mark

Thanks

Mark

Hi Mark, I’m not sure what you mean. The field is just for selecting preexisting posts in the database and storing the post id with the form submission.

Nathan

by
by
by
by
by
by