Skip to content

Case insensitive custom field params#15404

Merged
brandonkelly merged 2 commits into5.3from
feature/case-insensitive-params
Jul 24, 2024
Merged

Case insensitive custom field params#15404
brandonkelly merged 2 commits into5.3from
feature/case-insensitive-params

Conversation

@brandonkelly
Copy link
Copy Markdown
Member

Description

Color, Country, Email, Icon, Link, Plain Text, and Table fields’ element query params now support passing in an array with value and caseInsensitive keys.

{% set entries = craft.entries()
  .section('locations')
  .email({
    value: emailValue,
    caseInsensitive: true,
  })
  .all() %}

Related issues

@brandonkelly brandonkelly merged commit b44248b into 5.3 Jul 24, 2024
@brandonkelly brandonkelly deleted the feature/case-insensitive-params branch July 24, 2024 06:25
@rogerdawkins
Copy link
Copy Markdown

@brandonkelly The addition of caseInsensitive is great for querying, but is there a solution for ordering? I have a use case where I need to sort by Company Name and there are some companies names which are correctly stored as lowercase but I'd like them sorted case insensitively, is this possible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants