Archives: Snippets

  • Sort Form List by Newest First

    Reorders the Forms list table in the WordPress admin to show the most recently created forms first by default, sorting by descending form ID when no explicit orderby is set in the URL.

  • Show Optional Rather Than Required

    Changes the default behavior of Gravity Forms to show “Optional” for non-required fields rather than “Required” for required fields.

  • Restrict Form Shortcode Output by User Role

    Adds a custom roles attribute to the shortcode that restricts the rendered form to users with one of the specified WordPress roles. Logged-out users and users without a matching role see a fallback message instead of the form.

  • Use Placeholder for Radio “Other” Choice

    Replaces the default Other value on a Radio field’s “Other” choice with an empty value and a placeholder attribute, so the input appears as a hint instead of pre-filled text the user must clear.

  • Prevent Paste in Confirm Email Field

    Prevents pasting into the confirm email input field in email fields that have confirmation enabled. Displays a browser alert when a paste action is attempted.

  • Send Notifications When an Entry Is Updated

    Registers a new “Entry Updated” notification event and triggers matching notifications whenever an entry is edited from the admin. The event becomes selectable in the notification editor’s “Event” dropdown.

  • Image Choice Original Aspect Ratio

    Re-renders Image Choice field markup to use the full-size image (with original dimensions, srcset, and sizes) when the field has the CSS class original-aspect-ratio, and overrides the default fixed aspect ratio so each choice displays at its natural ratio.

  • Export US State as Abbreviation Code

    Converts the full US state name to its two-letter abbreviation code when exporting entries containing a US-type Address field. Only affects the state sub-input (input .4) of Address fields configured with the US address type.

  • Clickable Website & Email Links in Entries List

    Makes website and email field values render as clickable links in the Gravity Forms entries list view, using WordPress’s native make_clickable() helper.

  • Anonymize Entry Submitter Data

    Strips identifying submitter metadata from new entries: IP address, the logged-in user ID (created_by), and user agent string. Useful for privacy-conscious forms or GDPR compliance where this metadata is unnecessary.