Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more
2 votes
Accepted

Issue with Multiselect field and related entries

You haven't executed your element query. Try swapping out: {% set selectedCategory = entry.newsCategory %} for: {% set selectedCategory = entry.newsCategory.ids() %}
James Smith's user avatar
  • 5,284
2 votes
Accepted

Control Panel Date Picker: Inconsistent Date Format

All dates in the control panel are rendered localized as per the logged-in user's "Formatting Locale" user preference, or their "Language" setting if they haven't set a preferred ...
Mats Mikkel Rummelhoff's user avatar
2 votes
Accepted

Add number variable to template with prefix, suffix and currency

Fetching the field and outputting the following should work. {% set field = craft.app.fields.getFieldByHandle('my-field-handle') %} {{ field.prefix }} {{ entry.rentalPrice }} {{ field.suffix }} {{ ...
Ben Croker's user avatar
  • 7,496
1 vote

Select existing entries for a matrix-type field rather than creating new ones per entry

I think I found the solution. As I understand the matrix field shares the structure but not the content among different entries. So the content in a matrix field is always connected to an entry. What ...
flip's user avatar
  • 149
1 vote
Accepted

How to get field values by specific field type from all Entries?

I found a way: This function checks recursively whether a field exists with the searched type, if it is a matrix field then it searches further in it. private function filterFieldsByType($blocks, $...
antdev's user avatar
  • 137

Only top scored, non community-wiki answers of a minimum length are eligible