Questions tagged [custom-fieldtype]

The tag has no usage guidance.

13 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3 votes
0 answers
86 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
0 answers
90 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
0 answers
97 views

How can I make a SmartMap field required on a user profile page?

I am using Craft 2.5 (Beta) along with the fantastic SmartMap plugin. I have a user registration page that I am using the SmartMap field with like this: twig ... <div class="form-group has-...
  • 4,696
2 votes
0 answers
46 views

JavaScript equivalent to "namespaceInputName"?

Is there a JavaScript equivalent to namespaceInputName? My fieldtype settings are doing some interesting JavaScript gymnastics. Part of the process involves creating an array on the fly (so when the ...
  • 23.7k
1 vote
0 answers
123 views

Element type vs. Field type - or: Element type without database storage?

I have already searched for information on this topic but I did not find much. I hope I did not overlook something. My problem is the following: I want to try to write a plugin that lists entries ...
  • 481
1 vote
0 answers
31 views

Get Entries with a specified. Custom FieldType

I have created a Custom FieldType with AttributeType::Mixed The field actually saves the a Custom Model I created. I'm trying to retrieve all the entries that have my custom model as the field. I'm ...
1 vote
0 answers
252 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
0 answers
119 views

Custom Drop Down Field Type Validation

I have a custom fieldtype that I have built in a plugin. I want to validate these fields inside of field settings when data is added. I saw there was a getErrors method in the model however I am ...
  • 11
1 vote
0 answers
141 views

Custom field type not accessible in usermodel

I have altered the Craft usermodel using some standard field types (like an entry field type) and an customfieldtype (extended from the EntriesFieldType). The only thing I have altered in the child ...
  • 569
0 votes
0 answers
13 views

Register own FieldType in Craft 3.x

I have the following struggle. I tried to register my FieldType in my init function of the module.php. Event::on( Fields::class, Fields::EVENT_REGISTER_FIELD_TYPES, function(...
0 votes
0 answers
88 views

Custom plugin: asset fieldtype

I have a custom plugin that uses a custom field leveraging the elementSelect fieldtype to select an asset (which is then processed on submission via a custom service). However, when I select an asset ...
  • 1,731
0 votes
0 answers
99 views

Issue with external JS when toggling between entry types

I'm working on a custom plugin / fieldtype, and it requires first an external JS library, and then it needs to be initialized in-page. I.e: <script src="//remote.path.to/my_script.js"></...
  • 616
0 votes
0 answers
121 views

Is it possible to access backend fields from my own field type?

I'm trying to access the value of an asset field in a backend entry form from my plugins own field type. At the moment it's looking like the following: public function prepValue($value) { $...