Questions tagged [field]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
34 views

How to add Field to Template hook cp.entries.edit.settings and save value to entry?

I'm trying to show a custom lightswitch field inside the right panel on the edit page of an entry and saving its state to the entry when the user clicks on save. My form template looks like this: <...
0 votes
1 answer
26 views

Adding multiple blocks for matrix in form

I am using a matrix field for registered users on my site. I want to be able to add a certain amount of matrix blocks to each users on registration (with hidden input), so I can re-use them later on. ...
  • 19
1 vote
1 answer
42 views

Craft 4 - Upgrading Plugin to support Condition Fields

I've got a plugin that uses field layouts. I was asked about Craft 4 Conditional Field support so I went away to investigate. From what I gathered so far, the toggling of conditional fields happens ...
1 vote
1 answer
26 views

Matrix field entry link corrupted

Some of my links coming from a matrix field with entry became corrupted. Anyone had this before and knows how to fix it?
  • 19
2 votes
1 answer
78 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 ...
2 votes
1 answer
116 views

Whats crafts best practice when having to reuse fields

I'm looking for a way to do rapid development (i.e. not manually using the UI to create one field at a time). So if you have a page which requires multiple similar fields you can quickly add them? ...
  • 299
0 votes
0 answers
17 views

Fields are saved, but not loaded for some blocks

I'm experiencing an issue on my development-environment, and I cannot figure out what's going on. It seems that the fields of some of our blocks aren't being retrieved after saving. To reproduce I ...
2 votes
1 answer
73 views

Custom Field layouts

So many times im at odds with the layout of Craft Fields in the CMS, where from a usability and user interaction stand point I feel the layout can be way better and even mimic the front end result. ...
  • 299
1 vote
1 answer
37 views

The craft way of creating fields through code?

so I am new to Craft CMS, and would like to understand the Craft developer workflow. Currently I have been developing on EpiServer using C# in Visual Studio. We have a dev, staging and production ...
1 vote
1 answer
121 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 ...
  • 121
1 vote
1 answer
32 views

DIsplaying Field Label override on front end

In a Craft field layout, you can override the label for a field just for that layout/tab. However, when displaying a list of fields on the frontend, I can't find how to get that overridden label, ...
  • 113
0 votes
0 answers
109 views

internal server error when creating new field

whenever i try to save a new field I get an internal server error in the backend of craft 3. This happens whenever i want to create or modify a field that has an input like date, plain text, reactor......
1 vote
1 answer
67 views

Is there a query field?

In Craft, is there a field that allows the user to create a custom query in the back-end? Something similar to the filters in Wordpress' query loop block? https://wordpress.org/support/article/query-...
  • 35
1 vote
1 answer
33 views

Default field on any single pages

Not sure if I'm asking this question well, but I'll try... is there a way to have a field appear by default in all my single page? Currently whenever I create a new single page I have to manually add ...
  • 157
1 vote
1 answer
216 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 (...
1 vote
1 answer
54 views

How to get rules of conditional fields values on front-end, using Reasons or another solution?

I'm building a front-end form, where I'm displaying on front-end my fields following their layout within the CP: {% set section = craft.app.sections.getSectionByHandle('handle') %} {% set ...
0 votes
1 answer
32 views

How to get field widths when using getFieldLayout()?

I'm trying to show all my Channel's fields on front end, as they are shown on the CP: {% set section = craft.app.sections.getSectionByHandle('handle') %} {% set fieldLayout = section.getEntryTypes[0]....
1 vote
1 answer
52 views

Get raw/unformatted field values?

Is there a way to get raw/unformatted values for a field before they're passed to the field's normalizeValue function? That is, get the value close to how it's stored in the database? I haven't found ...
  • 6,955
1 vote
2 answers
84 views

Display entry data dynamicly in textfield

i have some data in my entry like productnames "Nike", "Puma" etc. which are headings i diplay in my template. {{ productnames1 }} "some text the contenteditor maybe wants do add" ...
1 vote
1 answer
91 views

New assets field not showing up for some users

I've added an assets field to an existing channel that shows up fine for me on both the new entry and editing existing entries, but it's not showing up for some users. I've cleared cache in Craft ...
1 vote
1 answer
35 views

Use same handle for different fields on different entry types

I've got two entry types: blog and job. Each has a category field but different category groups: blogCategories and jobCategories. I would like to write a Twig include to accept either a blog or a job ...
  • 173
2 votes
1 answer
54 views

Removing or hiding certain fields from the CP new entry for a specific user group

I'm trying to make some fields unavailable for a certain user group when they create or edit a new entry. These fields should only be available to admin users. I had implemented this by extending the ...
  • 65
1 vote
0 answers
44 views

Embedding code into an entry

I need to embed some coding into an entry, but I'm unsure how to do it. I understand that I need to put the code into a Plain text field, so I've created a Plain Text field in Settings, but I now don'...
1 vote
1 answer
64 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. ...
1 vote
1 answer
44 views

Getting average of number field values

I'm getting close to finishing my first project on Craft CMS but I have one problem. I'm using number fields to rate items in my entries. It looks like this: I will have around 6-7 fields and I need ...
0 votes
0 answers
25 views

Need to populate new field based on existing data

Say I have a section called "Stores" that has an existing field called "Store Hours". The client has populated the store hours for 1000 some stores. Now, however, it seems what the ...
  • 121
1 vote
1 answer
603 views

What's the difference between Neo and Matrix fields?

Im a bit new in Craft CMS But so far to me, seems like both allow the user to create multiple blocks of content
1 vote
1 answer
125 views

How to add target to link within field instructions?

I don't see anything in the documentation about how flexible the instructions fields are, as they use Markdown syntax. It's not clear how to add a target to a link, for example.
  • 608
1 vote
1 answer
93 views

Showing different field layouts for entries within the same structure

I set up a structure for pages that looks like this: - All Services - Service 1 - Service 1 subpage a - Service 1 subpage b - Service 2 - Service 2 subpage a - Service 2 subpage b ...
  • 149
1 vote
1 answer
189 views

How to make field instructions show as tooltip?

How to turn show as the following style
1 vote
1 answer
181 views

Get field type in templates

I need to get the field type in my templates like I used to do: field.getField.type but that does not seem to be working in Craft 3 anymore. The result is always null. It also seems that the »type« ...
2 votes
1 answer
213 views

How to search based on a Multi select category field in Craft 3?

I have a blog section with multi select categories. I want to filter all the blogs based on that multi select categories in the website. When I tried .search('category:ui-ux OR category:web-designs')...
1 vote
1 answer
2k views

Uploading Lottie animation files with images

For anyone who doesn't know what Lottie is, it is a video player created by the AirBnB team that lets you play vector animation exported from Adobe After Effects. It exports as json-files that you can ...
0 votes
0 answers
70 views

Add additional entry fields to backend search

The search field in the craft backend entry section searches the title and slug field by default. Is it possible to add custom entry fields to this search function (in my case e.g. a custom item ...
  • 1
2 votes
1 answer
72 views

"Field Limit is too big for your chosen Column Type" error on already existing fields when updating matrix

I'm getting the following error when I'm trying to update a matrix: "Field Limit is too big for your chosen Column Type."" I'm trying to add a new block type but this error keeps getting up on ...
  • 65
2 votes
1 answer
126 views

How get entries by sources in a frontend fieldlayout?

I have multiple entries fields that I want to use in the front-end. In the field settings I'll set up a sections source for each field. On the frontend I want a dropdown select box with all the ...
1 vote
1 answer
56 views

Outputting image assets with flickity

I'm trying to use flickity to create a draggable gallery on a single entry template, but I'm having issues with the output. In the backend it looks like this. A field using multiple assets. Without ...
  • 53
1 vote
1 answer
38 views

Matrix-field with a category-field to output category-title on single entry page

Me and categories, always giving trouble :) On blogs, we are using a matrix field and in one of the matrix-types, I have a category field. This is to output the title of the category. {% extends "...
1 vote
1 answer
195 views

How get field type in field layout

I'am building a website (craftcms 3.4+) where I'll need frontend entry editing. Therefore I'll need the fieldlayout of an entry. This is what I'll have: {% for tab in entry.fieldLayout.tabs %} ...
1 vote
1 answer
33 views

Categories field limit doesn't disable Add a Category button

I set the Branch Limit for a Category Field Type to 1, but after adding one category, the Add a Category button is still active. Shouldn't it be disabled after reaching the limit? Thanks!
  • 11
1 vote
1 answer
212 views

Impossible to access an attribute on a null variable - on the one() method - all() works!

First question - but I think this is a bug (not my fault). I have entries/pages (a structure) - one parent (product overview) with children (products) I have one category group with categories - ...
  • 11
2 votes
1 answer
185 views

Conditional fields based on structure level

I have a site that will heavily rely on the structure entry type to allow the client to publish content. The "1st" level of the structure will always act as a table of contents for its children. The ...
1 vote
1 answer
112 views

How do I store and retrieve elements for ElementSelectField? Getting error "Call to a member function getUiLabel() on array"

I have a field that allows a user to select multiple products and save them to the database for a plugin, but when I try to retrieve these values and have them selected in my form I get the error ...
1 vote
1 answer
34 views

Setting a field search variable after main entries variable changes values

Kind of hard to explain but here's an example: {{entries.all()|length}} {# outputs 88 #} {% set hasTopic = entries.search('dataTable_topic:*').all() %} {{entries|length}} {# outputs 7 #} How can I ...
  • 13
1 vote
3 answers
329 views

Execution timeout problem when trying to add new field

I've been having some problems since I've updated yesterday to craftcms v3.4 (was 3.3). When I try to add a new field via the admin, it takes an enormous amount of time (almost 5min, had to raise the ...
  • 65
2 votes
2 answers
79 views

Add user to entry user field [RSVP to Event]

I'm trying to add an RSVP button for users to register their attendance at my events. Once they click the button, I would like them to be added to a field called eventAttendees on the event entry. My ...
  • 193
1 vote
1 answer
106 views

What will happen if we change the field type in the fields (settings -> fields) in Craft 3?

I am a beginner in Craft CMS. I just want to know, what will happen if we change the field type in the fields (settings -> fields) in Craft 3?
1 vote
1 answer
69 views

Number field when empty and value=0

Is there a way to differentiate the number field value empty and 0? I would like to display this field only when there's a value in the field even though the value is 0. But when I input 0 into ...
1 vote
0 answers
58 views

Craft Table/Tabular static entry input field

Is there a way to set up a Craft CMS entry field to have a table with predefined rows and columns? I have tried with the native Craft Table field, but it allows users to add rows or edit default ...
1 vote
2 answers
201 views

Is there a way to make conditional input fields in Craft CMS?

I'd like to use conditional fields in my CMS instance. I found an old plugin called Reasons. I'm not sure it's compatible with Craft 3, so I'm looking for a workaround.

1
2 3 4 5 6