Questions tagged [field]

The tag has no usage guidance.

21 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
263 views

How can I create a dropdown field programmatically with a plugin?

I'm trying to create a Dropdown field and add it to the User field layout. I've successfully created an empty dropdown field (no options) and added it to the User field layout. Here is my current ...
2
votes
0answers
82 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
0answers
645 views

Asset dynamic subfolder paths referencing entry section not available until saved

I have an asset field within a matrix block, for which uploads are restricted to a single folder. The upload location path is set to {owner.section.handle}/{owner.slug}. Using this pattern the asset ...
1
vote
0answers
26 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
32 views

Store phonetics in plain text field

I need to store phonetics for word definitions in a plain text field. An example would be something like "Craft Website" => \ ˈkraft ˈweb-ˌsīt \, like you'd see in a dictionary. If I try saving \ ...
1
vote
0answers
66 views

Custom plugin: Creating new fields will delete the field group they're being created in

I have a simple plugin which reads in a CSV file, and based on the first row of data will create a new field group, and then create fields within that group. The first time I run it everything goes ...
1
vote
0answers
30 views

Asset field - saving assets with dynamic subfolder by categories not working consistently

I have two asset (image) fields in project entry type, both with the same setting and with different outputs… Anyone knows why? Thanks My fields are: intro image field gallery image field Both ...
1
vote
0answers
198 views

Unable to add data via migration to a new field

When I am creating a new field (and I've tried plain text, redactor, supertable and matrix field) and associating it with an existing entry type (using the Control Panel to do so), I run into an issue ...
1
vote
0answers
164 views

Craft CMS 3 create custom field in plugin with two fields returning two values

I need to get two text fields under the same custom form and have it return two different values to be stored in the database. Right now with what I have, it's storing the same variable for both, ...
1
vote
0answers
55 views

Creating variants

I need to create variants for my entries ( the entry type is Product but I'm not on Craft Commerce ). The variants have a number of features. Those features may change between products ( ex. variants ...
1
vote
0answers
187 views

Can't dynamically add value to hidden input Sprout field

I'm trying to add a hidden input with Sprout forms and Sprout fields but I can't dynamically add a value to the input attribute. I have a custom form template in craft/templates/_forms/field.html in ...
1
vote
0answers
44 views

Make fields sortable in CP

I'm displaying list of fields on frontend (using craft.fields.getFieldsByGroupId) and for that purpose I need the fields in group to be in particular order. Is there a way to add 'order' property to ...
1
vote
0answers
88 views

How to insert data with the querybuilder?

Is it possible to insert data with the query builder if so how? I want to make (backend) fields by queries. What is the easiest way to do this? Or do I have to use regular mysql queries?
1
vote
0answers
78 views

Entries relation

I have two entries, let's say A and B. In the B entry I can select multiple A entries in a entries field. I want to get B entries that have specific A entries selected. So i have the code: {% set ...
1
vote
0answers
236 views

Get entries using Multi-Select Field as Criteria

When querying for entries, I'm stuck on how to query for "selected" fields. The query I'm using: $criteria = craft()->elements->getCriteria(ElementType::Entry); $criteria->section('athletes'...
0
votes
0answers
16 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 ...
0
votes
0answers
14 views

Craft Guest Form Category, Date Not Saving

The examples are not working for me. The category value via the Guest Form plugin is not saving: <select name="fields[adCategory][]" id="adCategory"> <option value="">-- Category --&...
0
votes
0answers
43 views

Set field value of table field within matrix in a module?

I have a matrix called 'Election' with the structure: Block: role - Text field: roleName - Table field: candidates -- Text field: fullName -- Number field: votes My module can edit the roleName ...
0
votes
0answers
22 views

Include Field in URL

Looking for a way to include a field value in a section URL. Is this possible? It appears to work but always shows 'default' rather than the field value.
0
votes
0answers
191 views

Can't save fields

I want to change some fields and when I click 'save' it goes to the list of fields and the changes aren't saved. I can't add fields either. I can add and edit entries for example.
0
votes
0answers
76 views

How to create a plugin which will update a field in a section when an entry is saved

I am looking to create a plugin which will update a field in a section when I save an entry. I will be getting the length of an MP3 file (using FFMPEG) I upload via assets and output the time to ...