Questions tagged [fieldtypes]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
43 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, ...
1
vote
1answer
39 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.
0
votes
0answers
22 views

Display custom field content instead of full name for user field in craft admin

Is it possible to display custom field content attached to user profile instead of user's first and last name in the admin area for User field?
1
vote
1answer
294 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
52 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
57 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
61 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
76 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
309 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
47 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
0answers
44 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
97 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 ...
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 ...
1
vote
1answer
110 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
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.
2
votes
1answer
111 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
73 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
539 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
728 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
161 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
211 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
908 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?
1
vote
1answer
252 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
650 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
135 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
88 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 ...
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
562 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 ...
6
votes
1answer
272 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() ...
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 ...
2
votes
1answer
783 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 ...
1
vote
1answer
370 views

How to get Category URL from field in Matrix

This is my Matrix set up: I'm stumped to how to get the Categories URL. {% for block in entry.galleriesItem %} {% switch block.type %} {% case "galleriesItem" %} <a href="...
2
votes
1answer
409 views

Table fields, default single empty row, and never returning as empty?

I'm having a small problem with table fields. My issue is that by default a table fields starts with one row. Even if you leave this row empty (no values at all in any column) the field will never ...
3
votes
0answers
77 views

Set default order of Custom Fields inside Layout Tab

I'm writing a custom plugin, and I want to specify a custom order of the Fields in a tab. My plugin installs several fields, and I want the user to be able to simply add the tab that contains my ...
2
votes
1answer
44 views

Show on user profile page the commissions he is connected to

I have a commissions section in where we have a matrix field where we add the user (from craft.users) and the function of the user. A user can be in more that one commissions. On the user profile ...
4
votes
1answer
159 views

Plugin fieldtype settings for ColumnType::LongText being inserted as varchar(255)

I’m working on a plugin that includes a custom fieldtype. Using Craft 2.6.2911, the fieldtype’s defineSettings looks like this: public function defineSettings ( ) { return [ 'json_data' =...
3
votes
1answer
114 views

How can I make my custom FieldType show up in an element index?

I've built a custom FieldType, and I'd like editors to be able to add any fields using this FieldType to element indexes. Unfortunately, fields using my custom FieldType aren't included in the list of ...
2
votes
1answer
201 views

map values from checkbox field into category field using SQL

In a project I have a checkbox field called gradeLevels with 3 options (k-5,6-8, and 9-12). Due to design changes, I need to convert this field into a category field. I've made a new category with ...
2
votes
2answers
155 views

Restricting relationship field by author

First site using Craft and impressed thus far. I'm going to be allowing CP access for all users, and these users will have access to multiple channels. I want them to be able to relate their entries ...
1
vote
0answers
45 views

The fieldtype class “insert fieldtype class here” could not be found

I'm specifically having this issue with Sprout SEO, but I would imagine the problem would persist across any plugin, given whatever solution is used. Anywho, so I've got three environments - dev, ...
3
votes
1answer
341 views

How do I add a value to a tag field type using the entries service saveEntry method?

I am updating an entry using the entries service, I want to add a tag value into a tag field type (classifiedTags). $entry = craft()->entries->getEntryById(120); $entry->getContent()->...