Skip to content

Commit 525a36d

Browse files
committed
Update HtmlFormFields.php
1 parent 8b697df commit 525a36d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Ajax/semantic/html/collections/form/HtmlFormFields.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,12 @@ public static function radios($identifier,$name, $items=array(), $label=NULL, $v
115115
$fields[]=$itemO;
116116
}
117117
$radios=new HtmlFormFields($identifier, $fields);
118-
if (isset($label))
119-
$radios->setLabel($label)->setProperty("for", $name);
118+
if (isset($label)){
119+
$lbl=$radios->setLabel($label);
120+
if($lbl instanceof HtmlSemDoubleElement){
121+
$lbl->setProperty("for", $name);
122+
}
123+
}
120124
return $radios;
121125
}
122126

@@ -143,7 +147,7 @@ public function setEqualWidth($_equalWidth) {
143147
}
144148

145149
public function run(JsUtils $js){
146-
$result= parent::run($js);
150+
return parent::run($js);
147151
//return $result->setItemSelector("[data-value]");
148152
}
149153
}

0 commit comments

Comments
 (0)