Skip to main content

Questions tagged [entries-field]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
33 views

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

I am trying to get all values of a specific field type from all entries. (ex.: craft\fields\PlainText) Is there an easy way to get these values ?
antdev's user avatar
  • 137
1 vote
1 answer
109 views

Entry URI Format from an Entries Field (Categories)

i am trying to set the url format for some entries to include the category slugs set for it within a category entry field - i can get the first one like this {eventCategory.one().slug}/{slug} but ...
Malcolm Maclean's user avatar
0 votes
0 answers
33 views

Disable URL's for nested levels in structure but keep URL's for the 2 top levels

I have some products with categories that go 4 and sometimes 5 levels deep. The site will have an overview page for the first 2 levels. For example: my-website.com/category/subcategory I have created ...
Matthias's user avatar
  • 301
1 vote
2 answers
46 views

testing if oEmbed field is empty fails

I am using the 'oEmbed' plugin and I have an oEmbed field with the handle videoUrl. I am trying to do something very basic - to test if the field is empty. I am not sure why it fails. I have tried the ...
LessMore Creative Studio's user avatar
3 votes
1 answer
268 views

Eager-load entry field that is being paginated

We have this entry with a field called faq which can contain multiple faq entries. We paginate this field with this code: {% paginate entry.faq as pageInfo, pageItems %} Now Blitz Recomendations says ...
svondervoort's user avatar
1 vote
1 answer
63 views

Update from Craft 3 + Reasons to Craft 4: how to get fields' conditions from template?

I've just updated from Craft 3 to Craft 4. I was previously using the Reasons plugin for CP but also front-end purpose. On front-end, I was printing field layouts and show/hide the fields based on the ...
Romain P.'s user avatar
  • 1,852
2 votes
1 answer
298 views

Parent based Selectable Entries Condition

In the Craft CMS admin, I have an entries field on a page, and I want to limit the selectable entries available to only the child pages of the current entry. To achieve this, I set the Selectable ...
Mike Niland's user avatar
0 votes
0 answers
22 views

GET Checkbox Value to the Query (Entries Field) [duplicate]

I am writing my first post because I am stuck and cannot move forward. I need a filter that filters by "Entries Field." The selection is done through a form + checkbox. I also get the ID of ...
Tomka84's user avatar
2 votes
1 answer
976 views

Orderby entry field?

I am getting music album entries with the following code: {% set entries = craft.entries() .section('releases') .orderBy('title ASC') .all() %} Rather than ordering by the title, ...
fxfuture's user avatar
  • 279
1 vote
1 answer
106 views

Add entry to entry field via frontend form

I have a frontend form that updates a single entry and sets the users field to the current user: <form method="post" accept-charset="UTF-8"> {{ csrfInput() }} {{ ...
jlg1807's user avatar
  • 11
1 vote
0 answers
49 views

cannot create matrix in craftcms 4.2.3

I just created a fresh project with craftcms 4, but am running into issues creating a matrix. Even with just one block field. It gives me the error Cannot assign string to property craft\models\...
jbrightdev's user avatar
0 votes
1 answer
278 views

Navigation from structure with field Entries for URL

I am new to craftcms and searching did not get any answer. I have 2 fields setup navUrl (type entries) and customUrl (url) and I have a section called mainMenu with these fields. I have then added the ...
Thiag's user avatar
  • 1
3 votes
1 answer
399 views

How to get column name of an entrie's field

I want to query some entries in a section. I am able to write a query using a GET Param as a filter on the title field. If I want to query a custom field however I need to know the precise column ...
Aram Loosman's user avatar
1 vote
1 answer
236 views

How to find next sibling from entry order of parent entries field

I have an index of projects that uses a standard entries field to select multiple entries to display and also provides a custom order (different to their Structure order). This is my "Projects&...
Benek Lisefski's user avatar
0 votes
0 answers
77 views

Entries Field save errors

I'm running into some odd behavior with an entries field. There are multiple entries fields on the site and all work as expected but one. The behavior is as follows. If there are multiple entries ...
Josh Parylak's user avatar
1 vote
1 answer
391 views

Field dropdown - default value is not working in CMS

maybe this is a weird question but I have a dropdown field with values from 1 to 10, and set 4 as a default value. The thing is: I edit my entry and when I see my dropdown the value is number 1, but I ...
suhkha's user avatar
  • 121
3 votes
1 answer
141 views

How can I query entries related to another section’s entries having specific Matrix checkbox field values?

Let’s say I have a site with two sections: Things and Colors. Things has a Matrix field (thingsBlocks) with a Sizes block type. That Sizes block type has a checkboxes field (sizes) with values that ...
Matt Stein's user avatar
  • 4,006
1 vote
1 answer
171 views

What's the attribute of a Matrix field to add error message

I try to validate some fields before saving the entry, if the field is invalid, prevent the entry from saving and return the error message, I'm doing it via Element::EVENT_BEFORE_SAVE event. It works ...
Thomas's user avatar
  • 69
0 votes
1 answer
155 views

How to bind JavaScript events to entry form fields in the control panel

When adding an entry, there is a field called resource id, I want to build a front end event on this field, after the value input or changed, trigger ajax to call an external api to check whether the ...
Thomas's user avatar
  • 69
1 vote
1 answer
158 views

Allow drafts in entries field

Is it possible to allow selecting drafts in an entries field? Not drafts of an existing live entry, but drafts that aren't published yet. The only thing I found is an ElementCriteriaEvent triggered in ...
MoritzLost's user avatar
  • 11.5k
1 vote
1 answer
660 views

How to update a User's Entries custom field only once just after save?

From a custom module, I'm listening to EVENT_AFTER_SAVE_ELEMENT events, to be sure to get the Entry ID after save: Event::on( Elements::class, Elements::EVENT_AFTER_SAVE_ELEMENT, function (...
Romain P.'s user avatar
  • 1,852
1 vote
1 answer
409 views

On a Craft 3 multi-site, how can I setup an Entries field to select entries from other sites?

On my primary site on a Craft 3 multi-site, I have an Entries field used to add links to other sites' entries. These entries are from Channels / Stuctures that are using the Only save entries to the ...
Romain P.'s user avatar
  • 1,852
1 vote
1 answer
2k views

How do I write a GraphQL query to search through sub-entries/entries as fields and return the whole entry?

So I have a fairly complex section structure that (on an Entry Type) has a matrix field that contains entries as fields(sub-entry) within a blocktype. I'd like to write a GraphQL query such that when ...
Eric's user avatar
  • 133
2 votes
1 answer
136 views

How many levels will RelatedTo work? In Reverse?

The TL;DR summary: if I have a related Entries field that I access, can I then access an Entries field within that entry? I created a learning project running on MAMP to help me learn Craft, and one ...
doctorgloom's user avatar
1 vote
1 answer
197 views

Can't get a simple Reverse Relations for Entries field to work

I'm trying to get a simple Reverse Entries working, nothing fancy, but I'm stumped. I created a little personal project just to help me stretch and learn Craft better. I picked the NFL Draft just ...
doctorgloom's user avatar
2 votes
1 answer
170 views

Element API using the entries field to display related content from a separate section

I've seen similar questions but none seem to help. I have two sections named jobs and jobDescriptions. I'm using the entries field to pull in a description field from the jobDescriptions section to ...
lanceb's user avatar
  • 23
1 vote
1 answer
80 views

Best Practice on how to build a Pricing Page on CraftCMS

CraftCMS gives us so many ways/options on how to build pages that I'd love to see what people are doing with their pricing pages! I'm planning on building something similar to Amilia.com or Slack.com. ...
mateostabio's user avatar
1 vote
1 answer
107 views

How do you save custom fields on an EntryFixture?

I can't for the life of me figure out how to setup EntryFixtures in craft to populate with custom fields. I'm using the project config which already has the sections and fields defined in my tests. I'...
Myles Hyson's user avatar
0 votes
0 answers
33 views

Structuring externally scraped content

I scrape content from an external website using JSON API with the FeedMe plugin. Content is saved as entries with plain text and redactor-type Fields. How can I structure this content so that I can ...
Jay's user avatar
  • 11
3 votes
1 answer
340 views

what is the correct way to programmatically set checkboxes (MultiOptionsFieldData) in a migration? (solved)

I need to update existing entries after the creation of a checkbox fields, to apply the default value to everything that was created before the availability of the new field. The code should run in a ...
pecus's user avatar
  • 161
1 vote
1 answer
43 views

After Migration from v2.9 to 3.5 - some entries added into an entry-relation-field get added twice after saving

We migrated a craft cms site with 3 locales from v2.9 to 3.5 We have a section with a field of type "Entries". When editing the entry, and adding certain entries to this field, those get ...
Chris Angel's user avatar
1 vote
1 answer
916 views

Database Exception Column not found: 1054 Unknown column 'configVersion' in 'field list'

I get this Error when i want to save a Field. Also when i want to create a new field. I can hit the goback button and strangely the field gets still saved. I work local and have project config ...
TomS's user avatar
  • 213
1 vote
1 answer
20 views

Output specific entry from entries field based on position

I have an entries field in a section, I am looking to output a certain selected entry from this field based on its position. For example I want to out the 2nd or 3rd entry only from this entry field, ...
zizther's user avatar
  • 449
1 vote
1 answer
264 views

Possible bug when using Entries fieldtype with multi-site

Thought I'd run this by some people who know what they're doing before I report this as a bug. I have a multi-site configuration. One of the sites has a base URL of example.com and only contains one ...
Brimby's user avatar
  • 343
1 vote
1 answer
97 views

Feed Me import from CSV ignores decimal point

I use Feed Me to import values from a .csv file into my entries. Since a day i have an issue i can't explain. I didn't change anything. Precisely, the issue concerns a number field. In the .csv file, ...
TomS's user avatar
  • 213
1 vote
0 answers
126 views

Migrating to Matrix using Feed Me and Element API

How can I use Element API to move my entry fields into a matrix-based content builder? I'm going off the docs found at https://docs.craftcms.com/feed-me/v4/guides/importing-into-matrix.html#setup-your-...
Christopher Kennedy-Nuñez's user avatar
1 vote
2 answers
548 views

Group by related entries field

I have a channel of Musical Compositions: Now all these Compositions have a Composer. All the composers are stored in a separate channel and then linked with their respective compositions trough a ...
KSPR's user avatar
  • 3,786
1 vote
1 answer
52 views

Displaying An Entry's Image on Edit Page

Currently, these Entries display just the title. Has anyone found a way to display entries as a thumbnail (from it's image field)? I'm starting to look at plugins, but haven't seen anything that would ...
PatBranch's user avatar
1 vote
1 answer
29 views

Show Category Title only where an entry has been included in an Entries field

I have a Category Group with an Entries field assigned so the admin can select which existing Entries should fall within a given category. An Entry can be assigned to multiple categories. On the ...
Martin's user avatar
  • 1,203
1 vote
1 answer
265 views

Undefined index error in trying to duplicate file

I've inherited a Craft-based website, and I'm much more familiar with WordPress, so please pardon the extremely basic question: the homepage for this site uses {% extends "_layout" %} and then ...
nickpish's user avatar
  • 113
1 vote
1 answer
54 views

How to limit sources for Entries field set up via migration

I'm seeting up all of my project's fields using migrations. This works really well, but I haven't been able to figure out how to limit the sources (sections) for an entry selection field. I've based ...
JSICS's user avatar
  • 21
0 votes
0 answers
77 views

Add Matrix Blocks to existing Entry with Form without discarding existing Matrix Blocks

When I want to save an new Matrix block with an form to an existing Entry: <form method="post" accept-charset="UTF-8"> {{ csrfInput() }} <input type="hidden" name="action" value="entries/...
Rainer's user avatar
  • 11
1 vote
1 answer
61 views

How to include a lightswitch for each related entry in the source element of a relationship

I have a Services section in which I keep a related entry field for News. (News by Service) The News items to be displayed for each service are selected in a "News" entries field in the Service entry. ...
Jim's user avatar
  • 139
1 vote
2 answers
403 views

Get all available fields in plugin setting page

I am trying to get all the fields created by admin in my custom plugin setting page. As we can get entries , in same way can we have option to get the available fields. {{ forms.elementSelectField({...
inrsaurabh's user avatar
2 votes
1 answer
454 views

Use an entry field's value in body class

I have created a plain text field that is assigned to a section and is available in the tabs for entries in that section. I want to use this field's value to modify the CSS on my template. My _entry....
Mike Hermary's user avatar
3 votes
1 answer
403 views

Related Entries not sorting correctly

Craft 3.0.16.1 I have a relationship that is outputting entries, but the entries are not in the order as selected. {# not sorting correctly - **fieldName** is a variable passed via include #} {% ...
CreateSean's user avatar
  • 1,983
1 vote
0 answers
106 views

Check the field type of all the attributes of an entry

Here's the whole picture: I'm trying to make an API endpoint which should output everything from an entry: First I did this: public function transform(Entry $entry) { return $entry-...
Jorge Anzola's user avatar
1 vote
2 answers
499 views

Group entries by Category and then in each category by related entry field

I have a channel with categories and an entries field. I need to first group all entries by their category. This is working fine. {% set entries = craft.entries.section('publicationsChannel') %} {% ...
CreateSean's user avatar
  • 1,983
2 votes
1 answer
475 views

Element API Fetch Entries URL Within Matrix

I have a matrix with a field to set a Entries URL. Unfortunately the entry is not being returned, only an empty object. Here are my field settings below and element api code. See below for the ...
Filth's user avatar
  • 153
2 votes
1 answer
315 views

Using values from one entry as default values in another?

Is it possible to do the following in Craft? I want to set up course information as follows: 1) have a courseType which contains default values for that type of course - name (i.e. 3 hour skills, ...
Sjc's user avatar
  • 23