23 abstract public function addFields($fields=NULL,$label=NULL);
26 abstract public function count();
29 if(\is_array($value)){
30 $itemO=
new HtmlFormInput(JArray::getDefaultValue($value,
"id",
""),JArray::getDefaultValue($value,
"label",
null),JArray::getDefaultValue($value,
"type",
"text"),JArray::getDefaultValue($value,
"value",
""),JArray::getDefaultValue($value,
"placeholder",JArray::getDefaultValue($value,
"label",
null)));
32 }elseif(\is_object($value)){
40 return \is_object($value)===
false || $value instanceof \Ajax\semantic\html\elements\HtmlInput;
43 public function addInputs($inputs,$fieldslabel=
null){
45 foreach ($inputs as $input){
48 $f->fromArray($input);
51 return $this->
addFields($fields,$fieldslabel);
62 if(\is_array($values)===
false){
63 $values=\array_fill(0, $this->
count(),$values);
65 foreach ($values as $value){
66 $c=$this->content[$i++];
68 $df=$c->getDataField();
69 $df->setProperty($property,$value);
78 public function addFieldRule($index,$type,$prompt=NULL,$value=NULL){
81 $field->addRule($type,$prompt,$value);
89 $field->addRules($rules);
103 public function addDropdown($identifier,$items=array(), $label=NULL,$value=NULL,$multiple=
false){
128 return $this->
addItem(HtmlButton::dropdown($identifier, $value,$items,$asCombo,$icon));
139 public function addInput($identifier, $label=NULL,$type=
"text",$value=NULL,$placeholder=NULL){
151 public function addTextarea($identifier, $label,$value=NULL,$placeholder=NULL,$rows=5){
159 public function addButton($identifier,$value,$cssStyle=NULL,$onClick=NULL){
163 public function addButtonIcon($identifier,$icon,$cssStyle=NULL,$onClick=NULL){
167 $bt->onClick($onClick);
168 if (isset($cssStyle))
169 $bt->addClass($cssStyle);
180 public function addCheckbox($identifier, $label=NULL,$value=NULL,$type=NULL){
184 public function addRadio($identifier, $name,$label=NULL,$value=NULL){
188 public function addElement($identifier,$content,$label,$tagName=
"div",$baseClass=
""){
Base class for Semantic double elements.