Tagged: Iconpicker
- This topic has 4 replies, 2 voices, and was last updated 3 years, 1 month ago by
Steve.
-
AuthorPosts
-
-
January 7, 2019 at 10:34 am #9288
nuralamsiddikashikParticipantI’m so happy using the piklist But sadly, there is no icon picker field in the piklist. I read the entire documentation. How to get an icon picker or icon Picker will be released in next piklist released ?.
Thanks
Nur Alam Siddik Ashik -
January 7, 2019 at 11:45 am #9289
SteveKeymaster@nuralamsiddikashik– Piklist can probably build this for you. Can you provide an example of an Icon Picker field you like?
-
January 7, 2019 at 11:59 am #9290
nuralamsiddikashikParticipantpiklist(‘field’, array(
‘type’ => ‘icon_picker’
,’field’ => ‘demo_icon_picker’
,’label’ => ‘Icon Picker’
,’attributes’ => array(
‘class’ => ‘text’
)
));Attachments:
You must be logged in to view attached files. -
January 8, 2019 at 9:45 am #9292
nuralamsiddikashikParticipant@Steve any answer
-
January 9, 2019 at 1:38 am #9293
SteveKeymaster@nuralamsiddikashik– this is doable with Piklist. That field is essentially a radio field, but you select images instead of text.
You probably want your field to look something like this:
piklist('field', array( 'type' => 'radio' ,'field' => 'my_icon_picker' ,'value' => 'first' ,'label' => 'Choose an icon' ,'list' => false ,'choices' => array( 'icon_1' => '<img width="28px" src="http://my-first-image.jpg" />' ,'icon_2' => '<img width="28px" src="http://my-second-image.jpg" />' ,'icon_3' => '<img width="28px" src="http://my-third-image.jpg" />' ) ));If you have an array of the icons with their urls, you can populate the
choicesarray automatically.Hope this helps.
-
-
AuthorPosts
- You must be logged in to reply to this topic.