XF 2.0 can we use color box in custom admin option

hemant_bhardwaj

Well-known member
Well i am trying to give user to select the color in custom option of my addon ?
any way to get it ?

like we have text box
<xf:textboxrow name="nam_bar" label="icon" required="required" />

is there any thing for color selector like xenforo have in style properties ?
 
Last edited:
Not tested, but you might want to look at color_picker_macros public template. That is how it is used in style properties:

HTML:
<xf:macro template="public:color_picker_macros" name="color_picker"
            arg-name="{$formBaseKey}"
            arg-value="{$property.property_value}"
            arg-mapName="@xf-{$property.property_name}"
            arg-allowPalette="{{ $valueOptions.hidePalette ? 'false' : 'true'}}"
            arg-label="{$titleHtml}"
            arg-hint="{$hintHtml}"
            arg-explain="{$property.description}"
            arg-rowClass="formRow-styleProperty {$rowClass}" rowid="propRow_{$property.property_name}"
            arg-includeScripts="{{ false }}" />

You will need to use a custom option template I suppose.
 
Last edited:
Top Bottom