{"id":3902,"date":"2014-12-08T15:16:34","date_gmt":"2014-12-08T06:16:34","guid":{"rendered":"https:\/\/gunmagisgeek.com\/wordpress\/?p=3902"},"modified":"2019-01-11T14:55:43","modified_gmt":"2019-01-11T05:55:43","slug":"post-3902","status":"publish","type":"post","link":"https:\/\/gunmagisgeek.com\/blog\/webix\/3902","title":{"rendered":"[Webix]Form\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u5165\u9580"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/gunmagisgeek.com\/blog\/wp-content\/uploads\/2014\/12\/webform141208.jpg\" alt=\"web form\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\" width=\"349\" height=\"466\" class=\"aligncenter size-full wp-image-3903 border\" srcset=\"https:\/\/gunmagisgeek.com\/blog\/wp-content\/uploads\/2014\/12\/webform141208.jpg 349w, https:\/\/gunmagisgeek.com\/blog\/wp-content\/uploads\/2014\/12\/webform141208-112x150.jpg 112w\" sizes=\"auto, (max-width: 349px) 100vw, 349px\" \/><\/p>\n<p><a href=\"https:\/\/qiita.com\/advent-calendar\/2014\/webix\">Webix Advent Calendar 2014<\/a> \uff18\u65e5\u76ee\u306e\u8a18\u4e8b\u3067\u3059\u3002<\/p>\n<p>\u9593\u304c\u5c11\u3057\u7a7a\u304d\u307e\u3057\u305f\u304c\u3001\u4eca\u56de\u306fForm\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u4f7f\u3063\u3066\u307f\u307e\u3059\u3002<br \/>\nWebix\u306e\u30d5\u30a9\u30fc\u30e0\u6628\u65e5\u306f\u3001\u4ed6\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306b\u30c7\u30fc\u30bf\u3092\u675f\u7e1b\u3057\u3066\u9023\u52d5\u3055\u305b\u305f\u308a\u3001\u5909\u66f4\u5185\u5bb9\u304b\u3089\u5dee\u5206\u3060\u3051\u3092\u53d6\u308a\u51fa\u3059\u306a\u3069\u69d8\u3005\u306a\u6a5f\u80fd\u304c\u3042\u308b\u306e\u3067\u3059\u304c\u3001\u3068\u308a\u3042\u3048\u305a\u57fa\u672c\u7684\u306a\u3068\u3053\u308d\u3060\u3051\u3092\u3002<br \/>\n\u3044\u3065\u308c\u307e\u305f\u8a73\u3057\u3044\u5185\u5bb9\u3092\u63b2\u8f09\u3059\u308b\u3064\u3082\u308a\u3067\u3059\u3002<\/p>\n<h2>\u57fa\u672c<\/h2>\n<p>\u30ed\u30b0\u30a4\u30f3\u30d5\u30a9\u30fc\u30e0\u3092\u4f5c\u308a\u307e\u3059\u3002<br \/>\n\u57fa\u672c\u7684\u306b\u306f\u3001Webix\u306e\u30ec\u30a4\u30a2\u30a6\u30c8\u30b7\u30b9\u30c6\u30e0\u306b\u5408\u308f\u305b\u305f\u5f62\u3067Form\u30d1\u30fc\u30c4\u3092\u8a2d\u7f6e\u3057\u3066\u3044\u304f\u3060\u3051\u3067\u3059\u3002<br \/>\nform\u30d3\u30e5\u30fc\u306eelemets\u306e\u4e2d\u306b\u30d1\u30fc\u30c4\u3092\u8a2d\u7f6e\u3057\u3066\u3044\u304f\u3053\u3068\u3067\u3001\u5165\u529b\u3055\u308c\u305f\u5024\u306e\u53d6\u5f97\u306a\u3069\u304c\u7c21\u5358\u306b\u884c\u3048\u307e\u3059\u3002<\/p>\n<pre class=\"lang:js decode:true \" >webix.ui({\n    view:\"form\", \n    id:\"log_form\",\n    width:300,\n    elements:[\n        { view:\"text\", label:\"\u30e1\u30fc\u30eb\"},    \/\/ input text \n        { view:\"text\", type:\"password\", label:\"\u30d1\u30b9\u30ef\u30fc\u30c9\"}, \/\/ input password\n        { margin:5,\n            cols:[\n                \/\/\u30dc\u30bf\u30f3\n                { view:\"button\", value:\"\u30ed\u30b0\u30a4\u30f3\" , type:\"form\" },\n                { view:\"button\", value:\"\u30ad\u30e3\u30f3\u30bb\u30eb\" }\n            ]\n        }\n    ]\n});<\/pre>\n<p><iframe loading=\"lazy\" width=\"400\" height=\"200\" scrolling=\"no\" src=\"https:\/\/shimz.me\/example\/webix\/form\/login\/\"><\/iframe><\/p>\n<p><a href=\"https:\/\/shimz.me\/example\/webix\/form\/login\/\">example<\/a><\/p>\n<h2>\u30d1\u30fc\u30c4<\/h2>\n<p>Webix\u306b\u306f\u30c7\u30fc\u30bf\u30d4\u30c3\u30ab\u30fc\u3084\u30ab\u30e9\u30fc\u30d4\u30c3\u30ab\u30fc\u306a\u3069\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u3066\u3001\u7c21\u5358\u306b\u6271\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:js decode:true \" >webix.ui({ view:\"form\",width:300,\n    elements:[\n        {rows:[\n            {\n                rows:[\n                    {view:\"text\", label:\"\u30c6\u30ad\u30b9\u30c8\"},\n                    {view:\"checkbox\", label:\"\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\" ,labelWidth:110},\n                    { view:\"radio\", name:\"gender\", label:\"\u30e9\u30b8\u30aa\u30dc\u30bf\u30f3\", labelWidth:110,\n                        value:\"man\", \/\/\u521d\u671f\u9078\u629e\u5024\n                        options:[   \/\/\u9078\u629e\u80a2\n                            { value:\"\u7537\", id:\"man\" },\n                            { value:\"\u5973\", id:\"woman\" }\n                        ]\n                    },              \n                    { view:\"select\", name: \"country\", label:\"\u30bb\u30ec\u30af\u30c8\u30dc\u30c3\u30af\u30b9\",\n                        options:[\n                            { value:\"\u65e5\u672c\", id: \"JP\" },\n                            { value:\"\u30a2\u30e1\u30ea\u30ab\", id: \"US\" },\n                            { value:\"\u30a4\u30bf\u30ea\u30a2\", id: \"IT\"},\n                            { value:\"\u30c9\u30a4\u30c4\", id: \"DE\"},\n                        ]\n                    },\n                    {view:\"datepicker\", label:\"\u65e5\u6642\"},\n                    { view:\"colorpicker\", label:\"\u30ab\u30e9\u30fc\", name:\"color\", value:\"#ffaadd\" },\n                    { view:\"counter\", label:\"\u30b9\u30d4\u30f3\u30dc\u30c3\u30af\u30b9\", align:\"center\",  labelWidth:110},\n                    { view:\"textarea\" , height:100, label:\"\u30c6\u30ad\u30b9\u30c8\u30a8\u30ea\u30a2\", labelPosition:\"top\" }\n                ]\n            },\n            {view:\"button\", value:\"\u30dc\u30bf\u30f3\"}\n        ]},\n    ]\n});<\/pre>\n<p><iframe loading=\"lazy\" width=\"100%\" height=\"420\" scrolling=\"no\" src=\"https:\/\/shimz.me\/example\/webix\/form\/parts\/\"><\/iframe><\/p>\n<p><a href=\"https:\/\/shimz.me\/example\/webix\/form\/parts\/\">example<\/a><\/p>\n<h2>\u5165\u529b\u5024\u3092\u53d6\u5f97<\/h2>\n<p>webix\u306e\u30bb\u30ec\u30af\u30b7\u30e7\u30f3($$)\u306b\u3066\u30d5\u30a9\u30fc\u30e0\u8981\u7d20\u3092\u6307\u5b9a\u3057\u3001getValues\u30e1\u30bd\u30c3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u3067\u3001\u30d5\u30a9\u30fc\u30e0\u306b\u5165\u529b\u3055\u308c\u305f\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:js decode:true \" >\/\/\u30dc\u30bf\u30f3\u30af\u30ea\u30c3\u30af\u6642\u306e\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\nvar preview = { \n    \"onItemClick\":function(e, id, trg){\n        var formData = $$(\"my_form\").getValues();\/\/\u30d5\u30a9\u30fc\u30e0\u306e\u5024\u3092\u53d6\u5f97\n        alert(JSON.stringify(formData)); \n    }\n}\n\n\/\/\u5165\u529b\u30d5\u30a9\u30fc\u30e0\u30ec\u30a4\u30a2\u30a6\u30c8   \nwebix.ui({\n    view:\"form\", \n    id:\"my_form\",\n    width:300,\n    elements:[\n        { view:\"text\", name:\"name\", label:\"\u540d\u524d\"},     \n        { view:\"text\", name:\"mail\", label:\"\u30e1\u30fc\u30eb\"},\n        { view:\"radio\", name:\"gender\", label:\"\u6027\u5225\",\n            value:\"man\", \/\/\u521d\u671f\u9078\u629e\u5024\n            options:[   \/\/\u9078\u629e\u80a2\n                { value:\"\u7537\", id:\"man\" },\n                { value:\"\u5973\", id:\"woman\" }\n            ]\n        },\n        { view:\"select\", name: \"country\", label:\"\u56fd\",\n            options:[\n                { value:\"\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\", id: \"\"},\n                { value:\"\u65e5\u672c\", id: \"JP\" },\n                { value:\"\u30a2\u30e1\u30ea\u30ab\", id: \"US\" },\n                { value:\"\u30a4\u30bf\u30ea\u30a2\", id: \"IT\"},\n                { value:\"\u30c9\u30a4\u30c4\", id: \"DE\"}\n            ]\n        },\n        { margin:5,\n            cols:[\n                \/\/\u30dc\u30bf\u30f3\n                { view:\"button\", value:\"\u5165\u529b\u5024\u3092\u8868\u793a\", on:preview }\n            ]\n        }\n        ]\n});<\/pre>\n<p><iframe loading=\"lazy\" width=\"100%\" height=\"300\" scrolling=\"no\" src=\"https:\/\/shimz.me\/example\/webix\/form\/getValue\/\"><\/iframe><\/p>\n<p><a href=\"https:\/\/shimz.me\/example\/webix\/form\/getValue\/\">example<\/a><\/p>\n<h2>\u5024\u3092\u53cd\u6620\u3059\u308b<\/h2>\n<p>\u7de8\u96c6\u753b\u9762\u306a\u3069\u3067\u306f\u3001\u3059\u3067\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u5024\u3092\u5165\u529b\u30d5\u30a9\u30fc\u30e0\u306b\u53cd\u6620\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u304c\u3001Webix\u3067\u306fsetValues\u30e1\u30bd\u30c3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3060\u3051\u3067\u7c21\u5358\u306b\u5024\u3092\u5165\u529b\u30d5\u30a9\u30fc\u30e0\u306b\u53cd\u6620\u3067\u304d\u307e\u3059\u3002<br \/>\n\u30bb\u30ec\u30af\u30c8\u30dc\u30c3\u30af\u30b9\u3084\u30e9\u30b8\u30aa\u30dc\u30bf\u30f3\u306e\u9078\u629e\u306a\u3069\u3082\u81ea\u52d5\u7684\u306b\u53cd\u6620\u3057\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"lang:js decode:true \" >\/\/\u30d5\u30a9\u30fc\u30e0\u306b\u53cd\u6620\u3059\u308b\u30c7\u30fc\u30bf   \nvar data = {\n        \"name\": \"GUNMA GIS GEEK\",\n        \"mail\": \"hoge@hoge.me\",\n        \"gender\": \"woman\",\n        \"country\": \"IT\"\n    }   \n\n\n\/\/\u30dc\u30bf\u30f3\u30af\u30ea\u30c3\u30af\u6642\u306e\u30b3\u30fc\u30eb\u30d0\u30c3\u30af   \nvar setData = { \n    \"onItemClick\":function(e, id, trg){\n        $$(\"log_form\").setValues(data); \/\/\u30d5\u30a9\u30fc\u30e0\u306b\u5024\u3092\u53cd\u6620\u3059\u308b\n    }\n}\n\n\/\/\u5165\u529b\u30d5\u30a9\u30fc\u30e0\u30ec\u30a4\u30a2\u30a6\u30c8   \nwebix.ui({\n    view:\"form\", \n    id:\"log_form\",\n    width:300,\n    elements:[\n        { view:\"text\", name:\"name\", label:\"\u540d\u524d\"},     \n        { view:\"text\", name:\"mail\", label:\"\u30e1\u30fc\u30eb\"},\n        { view:\"radio\", name:\"gender\", label:\"\u6027\u5225\",\n            value:\"man\", \/\/\u521d\u671f\u9078\u629e\u5024\n            options:[   \/\/\u9078\u629e\u80a2\n                { value:\"\u7537\", id:\"man\" },\n                { value:\"\u5973\", id:\"woman\" }\n            ]\n        },\n        { view:\"select\", name: \"country\", label:\"\u56fd\",\n            options:[\n                { value:\"\u65e5\u672c\", id: \"JP\" },\n                { value:\"\u30a2\u30e1\u30ea\u30ab\", id: \"US\" },\n                { value:\"\u30a4\u30bf\u30ea\u30a2\", id: \"IT\"},\n                { value:\"\u30c9\u30a4\u30c4\", id: \"DE\"},\n            ]\n        },\n        { margin:5,\n            cols:[\n                \/\/\u30dc\u30bf\u30f3\n                { view:\"button\", value:\"\u30c7\u30fc\u30bf\u3092\u53cd\u6620\", on:setData }\n            ]\n        }\n        ]\n});<\/pre>\n<p><iframe loading=\"lazy\" width=\"100%\" height=\"300\" scrolling=\"no\" src=\"https:\/\/shimz.me\/example\/webix\/form\/setValue\/\"><\/iframe><\/p>\n<p><a href=\"https:\/\/shimz.me\/example\/webix\/form\/setValue\/\">example<\/a><\/p>\n<h2>\u5099\u8003<\/h2>\n<p>\u516c\u5f0f\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306f\u4ee5\u4e0b\u3088\u308a\u3002<\/p>\n<p><a href=\"https:\/\/docs.webix.com\/desktop__form.html\">document<\/a><br \/>\n<a href=\"https:\/\/docs.webix.com\/samples\/13_form\/index.html\">sample<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Webix Advent Calendar 201&hellip;<\/p>\n","protected":false},"author":1,"featured_media":3903,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[58],"tags":[],"class_list":["post-3902","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-webix","has-post-thumbnail-archive"],"_links":{"self":[{"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/posts\/3902","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/comments?post=3902"}],"version-history":[{"count":0,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/posts\/3902\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/media\/3903"}],"wp:attachment":[{"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/media?parent=3902"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/categories?post=3902"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gunmagisgeek.com\/blog\/wp-json\/wp\/v2\/tags?post=3902"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}