0

Basically I want to have my own widget as a choice in the widget drop down of an existing field type; and/or I want to be able to call field_view_field on a field and have it display the way I need, using info from the field itself and elsewhere.

I can probabaly do what I need with template_preprocess_field but I would prefer to hook the existing admin interface for selecting the output of the form.

I'm assuming that a solution is available that would allow the output of the field to be the way I configure it any place the field can be displayed, Views, etc.

Thanks in advance.

1 Answer 1

2

The Examples project on drupal.org has a field example, showing how to implement a widget.

Basically you need to implement hook_field_widget_info(), and for 'field types' include the field type your widget is for.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.