Conditions | 1 |
Paths | 1 |
Total Lines | 33 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
7 | public static function makeForm($value) |
||
8 | { |
||
9 | $form = []; |
||
10 | |||
11 | $form[] = ['label' => 'Group', 'name' => 'group_setting', 'value' => $value]; |
||
12 | $form[] = ['label' => 'Label', 'name' => 'label']; |
||
13 | |||
14 | $form[] = [ |
||
15 | 'label' => 'type', |
||
16 | 'name' => "content_input_type", |
||
17 | 'type' => "select_dataenum", |
||
18 | 'options' => ["enum" => ["text", "number", "email", "textarea", "wysiwyg", "upload_image", "upload_document", "datepicker", "radio", "select"]], |
||
19 | ]; |
||
20 | $form[] = [ |
||
21 | 'label' => "Radio / Select Data", |
||
22 | 'name' => 'dataenum', |
||
23 | "placeholder" => "Example : abc,def,ghi", |
||
24 | "jquery" => " |
||
25 | function show_radio_data() { |
||
26 | var cit = $('#content_input_type').val(); |
||
27 | if(cit == 'radio' || cit == 'select') { |
||
28 | $('#form-group-dataenum').show(); |
||
29 | }else{ |
||
30 | $('#form-group-dataenum').hide(); |
||
31 | } |
||
32 | } |
||
33 | $('#content_input_type').change(show_radio_data); |
||
34 | show_radio_data(); |
||
35 | ", |
||
36 | ]; |
||
37 | $form[] = ['label' => "Helper Text", 'name' => "helper", 'type' => "text"]; |
||
38 | |||
39 | return $form; |
||
40 | } |
||
41 | } |