post

Gravity Forms Field Settings

In my other post on How to Create a Custom Button in Gravity Forms with a Terms of Service Button Example, I mentioned the very important hook: gform_editor_js. However, what are the various field settings used for the various buttons?

So to get your custom field to have its property placement fields appear you will need to do something like this:

// Now we execute some javascript technicalities for the field to load correctly
add_action( "gform_editor_js", "wps_gform_editor_js" );
function wps_gform_editor_js(){
?>
 
<script type='text/javascript'>
 
    jQuery(document).ready(function($) {
        // from forms.js; can add custom "tos_setting" as well
        fieldSettings["my-custom-field"] = ".label_setting, .description_setting, .admin_label_setting, .size_setting, .default_value_textarea_setting, .error_message_setting, .css_class_setting, .visibility_setting, .tos_setting"; //this will show all the fields of the Paragraph Text field minus a couple that I didn't want to appear.
    });
 
</script>
<?php
}

You can also add the fields based on field type:

// Now we execute some javascript technicalitites for the field to load correctly
add_action( "gform_editor_js", "wps_gform_editor_js" );
function wps_gform_editor_js(){
?>
 
<script type='text/javascript'>
 
    jQuery(document).ready(function($) {
        // from forms.js; can add custom "tos_setting" as well
        fieldSettings["my-custom-field"] = fieldSettings["textarea"];
    });
 
</script>
<?php
}

And finally can also add the fields based on field type, plus whatever custom field placements:

// Now we execute some javascript technicalitites for the field to load correctly
add_action( "gform_editor_js", "wps_gform_editor_js" );
function wps_gform_editor_js(){
?>
 
<script type='text/javascript'>
 
    jQuery(document).ready(function($) {
        // from forms.js; can add custom "tos_setting" as well
        fieldSettings["my-custom-field"] = fieldSettings["textarea"] + ", .my_custom_setting";
    });
 
</script>
<?php
}

Click to reveal ALL the Field Settings

  • address: .conditional_logic_field_setting, .prepopulate_field_setting, .error_message_setting, .label_setting, .admin_label_setting, .address_setting, .rules_setting, .description_setting, .visibility_setting, .css_class_setting,
  • captcha: .captcha_type_setting, .captcha_size_setting, .captcha_fg_setting, .captcha_bg_setting, .conditional_logic_field_setting, .captcha_language_setting, .captcha_theme_setting, .error_message_setting, .label_setting, .description_setting, .css_class_setting,
  • checkbox: .conditional_logic_field_setting, .prepopulate_field_setting, .error_message_setting, .label_setting, .admin_label_setting, .choices_setting, .rules_setting, .visibility_setting, .description_setting, .css_class_setting,
  • date: .conditional_logic_field_setting, .prepopulate_field_setting, .error_message_setting, .label_setting, .admin_label_setting, .rules_setting, .date_input_type_setting, .duplicate_setting, .visibility_setting, .date_format_setting, .default_value_setting, .description_setting, .css_class_setting,
  • donation : .conditional_logic_field_setting, .donation_field_type_setting, .prepopulate_field_setting, .error_message_setting, .label_setting, .admin_label_setting, .rules_setting, .default_value_setting, .description_setting, .css_class_setting,
  • email: .conditional_logic_field_setting, .prepopulate_field_setting, .error_message_setting, .label_setting, .email_confirm_setting, .admin_label_setting, .size_setting, .rules_setting, .visibility_setting, .duplicate_setting, .default_value_setting, .description_setting, .css_class_setting,
  • fileupload: .conditional_logic_field_setting, .error_message_setting, .label_setting, .admin_label_setting, .rules_setting, .file_extensions_setting, .visibility_setting, .description_setting, .css_class_setting,
  • hidden: .prepopulate_field_setting, .label_setting, .default_value_setting,
  • html: .label_setting, .content_setting, .conditional_logic_field_setting, .disable_margins_setting, .css_class_setting,
  • name: .conditional_logic_field_setting, .prepopulate_field_setting, .error_message_setting, .label_setting, .admin_label_setting, .name_format_setting, .rules_setting, .visibility_setting, .description_setting, .css_class_setting,
  • number: .conditional_logic_field_setting, .prepopulate_field_setting, .error_message_setting, .label_setting, .admin_label_setting, .size_setting, .range_setting, .rules_setting, .visibility_setting, .duplicate_setting, .default_value_setting, .description_setting, .css_class_setting,
  • option : .product_field_setting, .option_field_type_setting, .conditional_logic_field_setting, .prepopulate_field_setting, .label_setting, .admin_label_setting, .default_value_setting, .description_setting, .css_class_setting,
  • page: .next_button_setting, .previous_button_setting, .css_class_setting, .conditional_logic_page_setting, .conditional_logic_nextbutton_setting,
  • password: .conditional_logic_field_setting, .error_message_setting, .label_setting, .admin_label_setting, .rules_setting, .duplicate_setting, .description_setting, .css_class_setting, .password_strength_setting
  • phone: .conditional_logic_field_setting, .prepopulate_field_setting, .error_message_setting, .label_setting, .admin_label_setting, .rules_setting, .duplicate_setting, .visibility_setting, .default_value_setting, .description_setting, .phone_format_setting, .css_class_setting,
  • post_category: .conditional_logic_field_setting, .prepopulate_field_setting, .error_message_setting, .admin_label_setting, .post_category_checkbox_setting, .post_category_initial_item_setting, .label_setting, .size_setting, .rules_setting, .visibility_setting, .duplicate_setting, .description_setting, .css_class_setting,
  • post_content: .conditional_logic_field_setting, .prepopulate_field_setting, .error_message_setting, .admin_label_setting, .maxlen_setting, .post_content_template_setting, .post_status_setting, .post_category_setting, .post_author_setting, .label_setting, .size_setting, .rules_setting, .visibility_setting, .default_value_textarea_setting, .description_setting, .css_class_setting,
  • post_custom_field: .conditional_logic_field_setting, .prepopulate_field_setting, .error_message_setting, .post_custom_field_setting, .post_custom_field_type_setting, .label_setting, .size_setting, .rules_setting, .visibility_setting, .duplicate_setting, .default_value_setting, .description_setting, .css_class_setting,
  • post_excerpt: .conditional_logic_field_setting, .prepopulate_field_setting, .error_message_setting, .admin_label_setting, .maxlen_setting, .post_status_setting, .post_category_setting, .post_author_setting, .label_setting, .size_setting, .rules_setting, .visibility_setting, .default_value_textarea_setting, .description_setting, .css_class_setting,
  • post_image: .conditional_logic_field_setting, .error_message_setting, .admin_label_setting, .post_image_setting, .label_setting, .rules_setting, .description_setting, .css_class_setting,
  • post_tags: .conditional_logic_field_setting, .prepopulate_field_setting, .error_message_setting, .admin_label_setting, .label_setting, .post_tag_type_setting, .size_setting, .rules_setting, .visibility_setting, .default_value_setting, .description_setting, .css_class_setting,
  • post_title: .conditional_logic_field_setting, .prepopulate_field_setting, .error_message_setting, .admin_label_setting, .post_title_template_setting, .post_status_setting, .post_category_setting, .post_author_setting, .label_setting, .size_setting, .rules_setting, .visibility_setting, .default_value_setting, .description_setting, .css_class_setting,
  • price: .rules_setting, .duplicate_setting,
  • product: .product_field_type_setting, .conditional_logic_field_setting, .prepopulate_field_setting, .label_setting, .admin_label_setting, .description_setting, .css_class_setting,
  • quantity : .product_field_setting, .quantity_field_type_setting, .conditional_logic_field_setting, .prepopulate_field_setting, .label_setting, .admin_label_setting, .default_value_setting, .description_setting, .css_class_setting,
  • radio: .conditional_logic_field_setting, .prepopulate_field_setting, .error_message_setting, .label_setting, .admin_label_setting, .choices_setting, .rules_setting, .visibility_setting, .duplicate_setting, .description_setting, .css_class_setting,
  • section: .conditional_logic_field_setting, .label_setting, .description_setting, .visibility_setting, .css_class_setting,
  • select: .conditional_logic_field_setting, .prepopulate_field_setting, .error_message_setting, .label_setting, .admin_label_setting, .size_setting, .choices_setting, .rules_setting,.duplicate_setting, .visibility_setting, .description_setting, .css_class_setting,
  • shipping: .shipping_field_type_setting, .conditional_logic_field_setting, .prepopulate_field_setting, .label_setting, .admin_label_setting, .description_setting, .css_class_setting,
  • singleproduct: .base_price_setting, .disable_quantity_setting, .rules_setting, .duplicate_setting,
  • singleshipping: .base_price_setting,
  • text: .conditional_logic_field_setting, .prepopulate_field_setting, .error_message_setting, .label_setting, .admin_label_setting, .size_setting, .maxlen_setting, .password_field_setting, .rules_setting, .visibility_setting, .duplicate_setting, .default_value_setting, .description_setting, .css_class_setting,
  • textarea: .conditional_logic_field_setting, .prepopulate_field_setting, .error_message_setting, .label_setting, .admin_label_setting, .maxlen_setting, .size_setting, .rules_setting, .visibility_setting, .duplicate_setting, .default_value_textarea_setting, .description_setting, .css_class_setting,
  • time: .conditional_logic_field_setting, .prepopulate_field_setting, .error_message_setting, .label_setting, .admin_label_setting, .rules_setting, .duplicate_setting, .visibility_setting, .description_setting, .css_class_setting,
  • total: .conditional_logic_field_setting, .label_setting, .admin_label_setting, .description_setting, .css_class_setting,
  • website: .conditional_logic_field_setting, .prepopulate_field_setting, .error_message_setting, .label_setting, .admin_label_setting, .size_setting, .rules_setting, .visibility_setting, .duplicate_setting, .default_value_setting, .description_setting, .css_class_setting,

post

Gravity Forms Snippets for Me to Remember

How to add a custom predefined choice list for Gravity Forms

// Add Custom Predefined Choice list for Gravity Forms
add_filter("gform_predefined_choices", "add_predefined_choice");
function add_predefined_choice($choices){
$choices["US/Canadian Regions"] = array("Virginia", "Augusta", "XXXX");
return $choices;
}

To get an editor (similar to TinyMCE) for paragraph text fields in GF:

  1. copy this code into an HTML block on a GF form
  2. <script src="http://js.nicedit.com/nicEdit-latest.js" type="text/javascript"></script>
    <script type="text/javascript">bkLib.onDomLoaded(nicEditors.allTextAreas);</script>
  3. That’s it!

NOTE – this will not work for paragraph fields set to conditional.

post

The Best Administrator Plugins for WordPress

I use a lot of plugins though many times I wish I had the time to work them into my core files. However, over time I have figured out what plugins I absolutely love. So what do I mean by Administrator plugins? These are plugins that help the Administrator create, organize, and even operate the site or blog. Typically, these are some of the first plugins that I install, and while the results can be seen on the other side, these plugins are primarily for the admin. I did not include the security or SEO plugins as I will write separate posts on those at a later time.

  1. Admin Management Xtended: This plugin allows the admin to  to be able to manage contents easily and quickly, especially important those who are using WordPress as a CMS. This plugin has a video demo as well.
  2. Broken Link Checker: There is nothing worse than having dead links or no images. This plugin helps you ensure that none of your links are dead, pictures go missing, or frustrate your readers. It lets you know on the WordPress Dashboard how many dead links that you have that need attention. One of the practices I started doing was if I referred to a page that served as a source for a content article, I would make a PDF of that article and store it on my site, so when the site takes down the article and/or the moved it somewhere, you have an easy place to refer people that ensures that people can see the content.
  3. Digital Fingerprint: No one likes their stuff taken, but how do you know if it is or not? This plugin solves that for you. “This plugin helps blog owners stay vigilant against unauthorized content use by the overwhelming majority of blogs that are splogs,” who steal your content!
  4. Gravity Forms: This is a premium plugin that is well worth the money because of the time it saves you. Previously I used plugins like cforms that were rather cumbersome. However, Gravity Forms allows you to create all sorts of forms including forms that turn into post drafts!
  5. My Category Order & My Page Order: One thing that I dislike about WordPress postings was the ranking number. I simply wanted to write, create, etc, and then go back and re-order easily. My Category Order and My Page Order allow just that. It uses a drag and drop interface that is simple and easy.
  6. Ozh Admin Drop Down Menu: This plugin is probably my most favorite admin plugin. One thing I absolutely dispised about WordPress was the lack of space to write posts, etc. This plugin moves the left menu system and replaces it with a drop down menu system, which means more horizontal space below! For small monitors, this is a dream come true.
  7. Widget Logic: This plugin is a bit more technical; however, it allows for much more customization. Many taut this as the best plugin for sidebar customization. Widget Logic allows widgets to appear or not depending on standard WP conditional tags, such as is_home() and is_single() and so on.
  8. Widgets Reloaded: Widgets Reloaded replaces many of the default widgets with versions that allow much more control. Widgets come with highly customizable control panels. Each widget (archives, authors, bookmarks/links, calendar, categories, pages, search, tags) can also be used any number of times.
  9. WordPress Navigation List (NAVT): This is also another favorite plugin of mine. This powerful tool is designed to provide you with complete control over the creation, styling and contents of your web site’s navigation. The plugin gives you the ability to create unique site navigation from your pages, categories and users using a Drag ‘n Drop Interface; arrange the items within a group in any arbitrary order. It requires the use of Javascript, so ensure that it is turned on.  However, be careful if you operate more than one website using this plugin as I have lost a few menu systems that way. Previous to this, I used Multi-level navigation plugin.
  10. Permalink Plugins: Personally, I don’t really care to much for the use of these; however, I always install one of the following, just in case I do eventually have the use of one of these. The two best permalink plugins are: Advanced Permalinks and Custom Permalinks. It personally doesn’t matter which one I use as I have found not much difference between the two functionally. However, if I were to choose, I would choose the Advanced Permalinks but I could be easily persuaded to encourage the use of the other as well.
  11. Embed iFrame: This will let you embed iframe – an HTML tag that allows a webpage to be displayed inline with the current page, in a WordPress post. Although an iframe can lead to a complicated website, it can be very effective when used appropriately. So if you wish to have an Amazon store on your WordPress site, you can, but you must use this plugin.
  12. Search Meter: This plugin helps you keep your blog focused on what your visitors want to read. It does this by keeping track of what your visitors are searching for. If you have a Search box on your blog, Search Meter automatically records what people are searching for — and whether they are finding what they are looking for. So it is an excellent plugin to help you come up with more blog posts or even to know which ones to edit (copywrite) so that they appear in the search box.