Inputs 2.7.0
September 29, 2017We are glad to let you know that we have released new update for Inputs package. Although there are no new controls, there are some important changes that you need to be aware of.
The data
property for selectable controls.
As you know, the data
property is used to set data directly to controls. The change of data
property is applied to selectable controls which are Select
, MultiSelect
, Select2
, BSelect
, RadioList
, CheckBoxList
. The input for data
now must in associate array format with text is key "{text}"=>"{value}"
"data"=>array(
"Awesome php report"=>1,
"Great reporting framework"=>2,
"Brilliant report tools"=>3
)
Another enhancement is that you may enter options as array like below example if option text and option value are the same.
"data"=>array(
"Awesome php report",
"Great reporting framework",
"Brilliant report tools"
)
The defaultOption
The defaultOption
format follows the same as format of data
which is {text}=>{value}
. You also can have as many default option as you want. All you need is to input the text and value into the array of defaultOption. For example:
"defaultOption"=>array("--"=>"")
Not forget to mention, the RadioList and CheckBoxList now have defaultOption
property as well. It make these two controls more flexible in building options. You may use defaultOption to add some more choices beside those you have from dataStore.
Summary
Above are changes for Inputs 2.7.0 compared to the previous version. This version aims at the stability and conformity of input controls. In the next version, we will add some nice widgets. If you have any suggestion of new widget we should add, do not hesitate to let us know.
<3 koolreport team