EasyUI Forum
April 25, 2024, 02:59:43 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: form.js load null value  (Read 10395 times)
happyraing
Newbie
*
Posts: 1


View Profile Email
« on: May 05, 2020, 12:19:41 AM »

the database fileds value is null

then call  form('load', row);

when row.comboboxval=null

combobox will throw an error : Cannot read property 'split' of null

the combobox multiple=true
« Last Edit: May 05, 2020, 12:32:46 AM by happyraing » Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: May 06, 2020, 11:46:37 PM »

A multiple combobox requires an array as its field value. Use this code to avoid this issue.
Code:
row.comboboxval = row.comboboxval || [];
$(...).form('load', row);
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!