Title: [Plugin: Simple Fields] Additional arguments
Last modified: August 20, 2016

---

# [Plugin: Simple Fields] Additional arguments

 *  Resolved [sugardaddy](https://wordpress.org/support/users/sugardaddy/)
 * (@sugardaddy)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-simple-fields-additional-arguments/)
 * I feel confuse when trying to use additional arguments for the post field.
    I’m
   trying to get only subpages of the current page (just to help my contributors)
   but none of my different syntaxes seems to work…
 * Any help is welcome !
 * [http://wordpress.org/extend/plugins/simple-fields/](http://wordpress.org/extend/plugins/simple-fields/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Thread Starter [sugardaddy](https://wordpress.org/support/users/sugardaddy/)
 * (@sugardaddy)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-simple-fields-additional-arguments/#post-3109683)
 * Any idea ? I know this is related to WP_Query but… well I need help for a correct
   syntax.
 *  Plugin Contributor [Pär Thernström](https://wordpress.org/support/users/eskapism/)
 * (@eskapism)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-simple-fields-additional-arguments/#post-3109685)
 * Do you mean when you’re editing a post and then in the select post-popup you 
   want only sub pages of the posts that you’re editing to show up?
 *  Thread Starter [sugardaddy](https://wordpress.org/support/users/sugardaddy/)
 * (@sugardaddy)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-simple-fields-additional-arguments/#post-3109686)
 * That’s it !!
 *  [mikevoermans](https://wordpress.org/support/users/mikevoermans/)
 * (@mikevoermans)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/plugin-simple-fields-additional-arguments/#post-3109728)
 * I was trying to find some documentation on this too – I couldn’t. So then I found
   the error in the code. The additional parameters aren’t being passed.
 * In scripts.js I’ve added the code that seems to get this working. Hopefully this
   helps others get the the solution quicker – as well as it added into a future
   update.
 * Please note: I’ve only added 2 lines – this is mostly for reference.
 *     ```
       // field type post
       	// popup a dialog where the user can choose  the post to attach
       	$(document).on("click", "a.simple-fields-metabox-field-post-select", function(e) {
   
       		e.preventDefault();
   
       		var a = $(this);
       		// get post types to show
       		var div = a.closest(".simple-fields-metabox-field");
       		var enabled_post_types = div.find("input[name='simple-fields-metabox-field-post-enabled-post-types']").val();
       		var additional_args = div.find('input[name="additional_arguments"]').val();
   
       		$("div.simple-fields-meta-box-field-group-field-type-post-dialog").data("originLink", this).dialog({
       			width: 480,
       			height: 'auto',
       			modal: true,
       			dialogClass: 'wp-dialog',
       			zIndex: 300000,
       			open: function(event, ui) {
       				var originLink = $($(this).data("originLink"));
       				arr_enabled_post_types = enabled_post_types.split(",");
       				$(this).text("Loading...").load(ajaxurl, {
       					"action": "simple_fields_field_type_post_dialog_load",
       					"arr_enabled_post_types": arr_enabled_post_types,
       					"additional_arguments" : additional_args
       				});
       			}
       		});
   
       	});
       ```
   
 *  Plugin Contributor [Pär Thernström](https://wordpress.org/support/users/eskapism/)
 * (@eskapism)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/plugin-simple-fields-additional-arguments/#post-3109729)
 * Thanks for digging into this and also for finding a solution. I’ll test this 
   and hopefully it’s included in the next release.
 *  Thread Starter [sugardaddy](https://wordpress.org/support/users/sugardaddy/)
 * (@sugardaddy)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/plugin-simple-fields-additional-arguments/#post-3109746)
 * I’m trying to do the same things with the bookmarks (fka blogroll).
    As it’s 
   part of the taxonomy now (the links categories), I try to call links from a category
   but links are not terms. Is there a way to achieve that ? This question was initially
   [posted here](http://wordpress.org/support/topic/is-there-a-way-to-get-blogroll-links-as-its-possible-for-posts)
 * Thanks for your help.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘[Plugin: Simple Fields] Additional arguments’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/simple-fields_fafafa.svg)
 * [Simple Fields](https://wordpress.org/plugins/simple-fields/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-fields/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-fields/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-fields/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-fields/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-fields/reviews/)

## Tags

 * [arguments](https://wordpress.org/support/topic-tag/arguments/)
 * [wp_query](https://wordpress.org/support/topic-tag/wp_query/)

 * 6 replies
 * 3 participants
 * Last reply from: [sugardaddy](https://wordpress.org/support/users/sugardaddy/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/plugin-simple-fields-additional-arguments/#post-3109746)
 * Status: resolved