Problem/Motivation

I want to use the font icon picker field on a custom form

Proposed resolution

Remaining tasks

Create the form, create the field, used "font_iconpicker" as type but is not working

$form['icon_picker'] = [
        '#type' => 'font_iconpicker',
        '#title' => $this->t('Icono'),
        '#description' => $this->t('Icon'),
        '#default_value' => $config['icon_picker'] ? : '',
    ];

It's my first time trying to reproduce a field provided by a contrib module to a custom form and maybe it is really simple, if you can please, provide some light, that will be great.

I read about field and widget importing but it was on D7 hooks and didn't use them,

Thanks in advance,

Comments

mpereztejeiro created an issue. See original summary.

s3b0un3t’s picture

Category: Support request » Task
Status: Active » Needs work

Hello,

The module does not currently allow the "IconPicker" field to be used as a simple form element. It is dependent on Field UI.

However, it is possible to consider its implementation.
If you have the skills, don't hesitate to submit a Merge Request, otherwise, I will try to find the time to set it up soon.

s3b0un3t’s picture

Assigned: Unassigned » s3b0un3t
Status: Needs work » Fixed

Hello,

I have just created a 1.1.0 release which implements a "font_iconpicker" form element.
It is now possible to use this widget in custom forms.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.