Questions tagged [fieldtypes]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
30 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 ...
1
vote
1answer
44 views

Special characters like ✓ are not being saved in text fields

we have just noticed that characters like ✓ are being saved in the title field but not in plain text fields regardless of the database type (PostgreSQL / MySQL) or field type in the database (text, ...
10
votes
3answers
3k views

How to add more options to the 'Restrict allowed file types' settings?

I am wondering what would be the best approach to add another file type to the 'Restrict allowed file types' asset field settings? For our website specification we need to have .zip files and .pdf ...
1
vote
1answer
42 views

How to Auto-generate a Title based on a multiple entries titles? (using a Entries field type)

I have two sections (both Channel type): Releases Movies Releases have one Entries field type, the source is Movies So, I want Auto-generate a Release title from Movies, like this: Titanic, Avatar, ...
0
votes
0answers
18 views

Field type that lets me select fields

I am trying to find a field type that lets me select one or more fields. I want to use this on a category to let the user select which fields should be used a faceted filters on the product listing.
1
vote
1answer
344 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
0
votes
0answers
56 views

Updating Search Indexes failing because of "rouge" invalid field handle

I'm on the latest build 3.5.3. I created a Lightswitch field type within a Matrix field in my local dev env and called it "colorBlock". No problems there. When I recreated this in my staging ...
2
votes
1answer
59 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 ...
1
vote
1answer
63 views

How to loop through a table and set variables based on the existence (or not) of data in those tables?

I am using a table field in Craft (price) limited to one row only, used to manage price setting in different currencies on an entry. The three cols each contain number fields with the handles dkk, ...
0
votes
1answer
14 views

Is it possible for an assigned entry (via field type Entries field) to know what it has been assigned to?

I have two entry types 'pipeline' (structure) and 'series' (channel). I know I can add children in a structure, but I want to keep 'pipeline' and 'series' separate to avoid duplication, as a series ...
1
vote
1answer
81 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
2answers
329 views

Proper way to implement array of objects as Craft field

I'm using Craft CMS for the first time and have a question about the proper/best practice to store what would equate to an array of objects (or just a plain array) in Javascript or JSON. Say I'd like ...
1
vote
1answer
49 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
1answer
102 views

Craft CMS 3 Date Field problem

I added some date fields on my entry. I select a date and save the entry. But the date field saved the day before. Every editing the entry continue saving the day before. When the date comes to the ...
23
votes
1answer
2k views

How can my plugin generate a generic modal window in the Control Panel?

I'm working on a plugin, and it requires a modal to be displayed when the user interacts with a field of my Field Type. When the user finishes interacting with the modal, they would click "Done". ...
1
vote
0answers
46 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
1answer
31 views

Pulling blog entries related to a structure entry field type

fairly new to craftCMS. I've wrestled with this now for hours and exhausted all research avenues. I have three main "service pages" (Web Design, Digital Marketing, Hosting & Analytics) These are ...
1
vote
0answers
27 views

Storing complex field content (plugin)

I'm trying to work through some issues with the field content for our Maps plugin, but I'm not sure about the best way to go about it. Currently the value for each map field is stored as an element ...
5
votes
2answers
600 views

List of reserved field handles

Is there somewhere documented on what field handles are reserved? Would be great to have this as a resource here, especially for plugin development. Edit: A good place to start would be https://...
1
vote
1answer
120 views

Loop through all created fields and get the field type

I want to show some input fields on frontend template form. Type of input is dependent on the type of fields selected on the backend. For example, if the text field is selected in the backend I ...
1
vote
1answer
169 views

Type number form in textField for plugin

I haven't found any fields that deal with numbers for a plugin. I've changed a forms.textField into a type:number which has seemed to work fine for the most part. But I can't find a way to keep ...
1
vote
1answer
25 views

Values from fields in templates

I have categories in my cms. How do I gets a list of these value into my templates? Thanks.
6
votes
1answer
282 views

Reorder selection of categories in category fieldtype

I'm looking to reorder my selected categories within a category field. I'm hoping this is possible because the order an editor selects these categories is important, primarily for the .first() ...
2
votes
1answer
116 views

Pre-fill fields when creating an entry in CP

I am using redactor plugin for my field type and I want to use global values of the same field type to be used as pre-fill value when creating a new entry. Use case: Each year there is an edition of ...
1
vote
1answer
197 views

Commerce discount promotions as a fieldtype?

I'd like to create an entry in Craft that talks about a new discount, and then choose that discount via a field (so a bit like you can choose an entry or a product). That way, should the parameters of ...
3
votes
1answer
32 views

Partial Dates within Craft

Is it possible to store partial dates? EG i want to create a document that covers a date range, sometimes that range could be Jan/2013 to JUN/2014 other times we may need it more specific EG 20/JAN/...
2
votes
1answer
75 views

Craft CMS 3 data structure advice for vehicle make, model, trim, year tagging

Hi i really would like some advise on best practices on setting up some data for my Craft APP. Most of my documents will be linked to vehicle make/model/trim/year. EG Audi A5 Sport 2009-2016 and/Or ...
1
vote
2answers
557 views

How to Access the Twig Attribute Name from the Fieldtype Class

I want to be able to output different values for my fieldtype depending on the twig attribute. So {{ entry.myField }} would output AK by default, but {{ entry.myField.label }} would output Alaska. ...
1
vote
1answer
762 views

Custom Field Settings: Unknown Property Error

I have a custom field with a setting for regionType, but when I try to save the field I get this error: Setting unknown property: kgrote\siteutilities\fields\Regionselect::regionType In my ...
1
vote
1answer
221 views

Where does Craft store the field definitions?

I would like to add field and section definitions to versioning. Or at least, have them backed up constantly. I haven't been able to find out yet how craft handles this. I'd say it's in the database, ...
2
votes
1answer
950 views

How can I get the type of a field using Twig?

I would like to loop through all the fields of a field layout tab form the current entry. This is working fine to get the field name and value: {% for fieldLayoutField in entry.getFieldLayout()....
1
vote
1answer
48 views

Custom Pluging Entries FieldType

I have 2 plugins I created that store similar data: Plugin 1: id, name, panel_id, price Plugin 2: id, name, test_id, price I want to attach my plugin data to an entry, and I need to make sure they ...
2
votes
1answer
81 views

warning icon on fields

I am seeing warning icons on drop down fields like this Where does this come from?
1
vote
2answers
1k views

How can I get entry id in field

I create a new filed type and attached it to entries. Now I need to get the entry id which the field is attached to. I tried $this->element in my field class, but got an error said that I'm ...
1
vote
0answers
46 views

How do you include an "Add element" button to the element selector modal

In my plugin's field types I am extending the BaseRelationField. How do you activate the "Add Element" button that shows in the Element Selector modal when the element is double clicked?
3
votes
2answers
644 views

Target a certain entry type on the entries fieldtype

I have all of my entries as single pages, but of different types depending on the section. I need to create a field that allows users to link to another page entry, but I need to ensure they only ...
1
vote
1answer
255 views

Is it possible to use an existing field into a matrix?

I'm trying to reuse a dropdown field inside of a matrix. I've already created a field which has hundreds of dropdown values. I want to be able to select from this dropdown field for each item of a ...
3
votes
1answer
657 views

Missing Position Field Type in Matrix (Craft 3)

Anyone know how to get the Position field type to show up in Craft 3 (RC)? I have a Matrix field, and an Asset/Image field within that, and I'm trying to add a Position field to it.
2
votes
1answer
137 views

Plugin Development: find source group used by field

I'm writing a plugin that works with Fields in various ways, one thing I need to do is get the category source groups available to a particular category field. I have the field's handle and id and can ...
0
votes
1answer
89 views

How to display all fields for an entry within an entry field type?

I've got a portfolio site I'm building, and on each project's page I'm wanting to show a list of people who worked that project. I created a channel section called "work" with an entry field type ...
7
votes
3answers
2k views

Default field values?

This seems so simple, but after reading over the docs, I couldn't find an answer: Is there a way to have a field have a default value in Craft? In my case, I have a Lightswitch field that I want to ...
0
votes
1answer
178 views

Change field arrangement from the entries page

In ExpressionEngine you can rearrange the field types from inside the entry. I was wondering if there was any feature like this in Craft? I've got a lot of different types of entries so it's a pain to ...
1
vote
1answer
258 views

Use-case: custom plugin or extended use of entries/categories/tags

I have to integrate a jobs feed into our website and I've been digging in the documentation, reading the core's code for a while now, and I am in a dilemma trying to figure out if in out use case I ...
3
votes
1answer
383 views

Resource for setting up Craft CMS Fields

It's a good 7 months after the last time this question was asked. I've been developing sites for a long time, expert with Wordpress, some Drupal, Joomla when forced. I can understand a good part of ...
2
votes
1answer
788 views

More than one field for a fieldtype plugin

I can have many 'settings' fields for a fieldType and they're saved as a serialized string in the database. Is it possible to have more than one field for the fieldType itself? It looks like there's ...
2
votes
3answers
1k views

Plugin for entries table field

In Craft we have the table field type and each column can have a type. This field type is restricted to only text, number and checkboxes. Is there a plugin to add entries field type to the column ...
1
vote
2answers
2k views

How to loop through matrix block fields and pull out handle and content?

Ok this is similar to a previously asked question How to display all fields belonging to current entry? However I'd like to extend this so that it deals with matrix entry types. I have the following ...
2
votes
0answers
87 views

Custom fieldtype to add text field to dropdown, radiobuttons and checkboxes

In my plugin I need to create a fieldtype of a dropdown, radiobutton or checkbox combined with a textfield. I've gone ahead and created a custom field type using the description here https://craftcms....
2
votes
1answer
566 views

Dynamic placeholder text in 'Plain text' field type

I have a plain text field that encourages content editors to write a more detailed description of a piece of content. However, on the front-end the template will use the post title by default if this ...
1
vote
1answer
55 views

Is there a fieldtype in Craft like "Content Elements" or "Bloqs" for ExpressionEngine?

I have been using EE for over 5 years now, and am just starting to get into Craft (and I love it!). In my recent EE sites, I've used Content Elements, and it has been a great way to give my clients ...