Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Customising the CMS /

CheckboxsetField -> Value


Reply


495 Views

Avatar
StefanDpunkt

Community Member, 14 Posts

17 October 2013 at 9:07pm

Edited: 17/10/2013 9:27pm

Hi,

I have a question about " CheckboxsetField " .
I put a CheckboxsetField as follows to:

$ fields -> addFieldToTab ( ​​" Root.Material ", new CheckboxsetField (
  " Material ", " material " ,
  array (
    "Men " => " people " ,
    "Women " => "Women "
    " Functional" => " functional fiber "
    " Cotton " => " cotton " ,
    " QuickDryFinish " => " Quick Dry Finish"
    " IndoorDryStretch " => "Indoor Dry Stretch "
    " IndoorDryIntelligent " => "Indoor Dry Intelligent "
    " IndoorDry " => "Indoor Dry "
    " CoolMax " => " Cool Max "
    )
  )
);

in the template and get the following output:

<input type="checkbox" id="Men" name="series[]" value="Men" />
<input type="checkbox" id="Women" name="series[]" value="Women" />
<input type="checkbox" id="Funktionsfaser" name="series[]" value="Funktionsfaser" />
<input type="checkbox" id="Baumwolle" name="series[]" value="Baumwolle" />
<input type="checkbox" id="Quick Dry Finish" name="series[]" value="Quick Dry Finish" />
<input type="checkbox" id="Indoor Dry Stretch" name="series[]" value="Indoor Dry Stretch" />
<input type="checkbox" id="Indoor Dry Intelligent" name="series[]" value="Indoor Dry Intelligent" />
<input type="checkbox" id="Indoor Dry" name="series[]" value="Indoor Dry" />
<input type="checkbox" id="Cool Max" name="series[]" value="Cool Max" />
[/code ]

But I want to have a value in the 1 , or string !

How do I solve this ?