Gravity Forms Custom Templates [closed]

You can change a bunch in one hit with the gform_address_types filter, like this: /** * customise the Address field labels * @param array $addressTypes * @return array */ add_filter(‘gform_address_types’, function ($addressTypes) { $addressTypes[‘international’][‘zip_label’] = ‘Postcode’; $addressTypes[‘international’][‘state_label’] = ‘State’; return $addressTypes; });

Removing an admin page added by a 3rd party plugin. Gravity forms in this example

Ok, Eugene’s Answer works in the case of a plugin that doesn’t deals with custom capabilities. http://codex.wordpress.org/Roles_and_Capabilities The WordPress Plugin API allows Roles and Capabilities to be added, removed and changed. Since Plugins might change Roles and Capabilities, just the default ones are addressed in this article. So, if his code works without checking for … Read more

Saving images from Gravity Forms repeatable File Upload as post attachments [closed]

Perhaps instead of having a repeatable upload field, use conditional logic to tie a dropdown or radio which asks how many uploads the user needs (1, 2, 3, 4, 5…), and then a series of pre-built upload boxes which show up based on what number was selected. It’s not 100% dynamic, but hopefully you have … Read more

How to get the Gravityform entry ID from current user’s form submission? [closed]

You can use the gform_after_submission hook[1] to add the Entry ID (and probably the Form ID to minimize confusion if you have multiple forms) to the user’s meta information using add_user_meta(). <?php add_action( ‘gform_after_submission’, ‘wpse96468_map_user_to_entry’, 10, 2 ); // to tie it to a specific form, use the format below, // replacing ‘{$form_id}’ with the … Read more

Delete the original big size image after upload and leave only 3 images crunched by media gallery

How about this: add_filter( ‘wp_generate_attachment_metadata’, ‘delete_fullsize_image’ ); function delete_fullsize_image( $metadata ) { $upload_dir = wp_upload_dir(); $full_image_path = trailingslashit( $upload_dir[‘basedir’] ) . $metadata[‘file’]; $deleted = unlink( $full_image_path ); return $metadata; } Not 100% sure everything will work ok without the main image, but it does the trick. You wont be able to regenerate the thumbnails / … Read more

gravity forms : use previous dropdown choice as variable in gform_pre_render? [closed]

Eventually the solution I used was this. Upon change of Dropdown A I have an ajax function request tha re-populated Downdown B with the filtered options based on the selection in Dropdown A. See the ajax jquery script… countryFilter = function () { var countryClass=”.dealer-country select”, dealerClass=”.dealer-name select”; $(countryClass).change(function(){ var countrySelect = $(this), country = … Read more