Skip to content

Commit

Permalink
Update FormHelper.php
Browse files Browse the repository at this point in the history
  • Loading branch information
funadmin authored Jul 19, 2022
1 parent 231cc74 commit 1789636
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/helper/FormHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,7 @@ public static function switchs($name = '', $switch=[], $options = [], $value = '
*/
public static function checkbox($name = '', $list = [], $options = [], $value = '')
{
if (empty($value)) {
$value = $name;
}
if (empty($value)) $value = $name;
if (is_string($value) && strpos($value, "\n") !== false) $value = explode("\n", $value);
if (is_string($value) && strpos($value, ",") !== false) $value = explode(",", $value);
if (is_string($value) && strpos($value, "|") !== false) $value = explode("|", $value);
Expand All @@ -202,11 +200,8 @@ public static function checkbox($name = '', $list = [], $options = [], $value =
&& strpos($value, ",") === false
&& strpos($value, "|") === false
) $value = explode(",", $value);
$input = '';
$skin = '';
if (isset($options['skin'])) {
$skin = 'lay-skin="' . $options['skin'] . '"';
}
$input = '';$skin = '';
if (isset($options['skin'])) $skin = 'lay-skin="' . $options['skin'] . '"';
if (is_array($list) and $list) {
foreach ($list as $k => $v) {
if (is_string($v) && strpos($v, ':') !== false) {
Expand Down

0 comments on commit 1789636

Please sign in to comment.