pictcode / app / View / top / contact.ctp @ 13c8314a
履歴 | 表示 | アノテート | ダウンロード (3.561 KB)
1 | 1711ffed | shiwa | <!-- お問い合わせ --> |
---|---|---|---|
2 | <main role="main"> |
||
3 | <article class="contact"> |
||
4 | <h2> |
||
5 | <img src="/img/img_h1_contact01.png" alt="お問い合わせ - 送信内容入力"> |
||
6 | </h2> |
||
7 | 67acbfb5 | hasse | <p>PictCodeに関するお問い合わせやご相談、ご質問などがございましたら、下記のお問い合わせフォームよりご連絡ください。</p> |
8 | 1711ffed | shiwa | <hr> |
9 | b3a58ce1 | hasse | <?php echo $this->Form->create('ContactValidate',array( |
10 | 'div' => false, |
||
11 | 'novalidate' => true, |
||
12 | 'inputDefaults' => array( |
||
13 | 'before' => '<dt>', |
||
14 | 'between' => '</dt><dd>', |
||
15 | 'after' => '</dd>', |
||
16 | 'div' => false |
||
17 | ) |
||
18 | )); ?> |
||
19 | <fieldset> |
||
20 | <section> |
||
21 | <dl> |
||
22 | <?php |
||
23 | echo $this->Form->input('name', |
||
24 | array( 'type' => 'text', |
||
25 | 'label' => 'お名前', |
||
26 | 'placeholder'=>'お名前' |
||
27 | )); |
||
28 | echo $this->Form->input('email', |
||
29 | array('placeholder'=>'半角英数字', |
||
30 | 'label' => 'メールアドレス', |
||
31 | 304d523f | hasse | 'style'=>'ime-mode: disabled;', |
32 | b3a58ce1 | hasse | 'maxlength' => '255', |
33 | 'type' => 'email')); |
||
34 | 67acbfb5 | hasse | echo $this->Form->input('email_confirm', |
35 | b3a58ce1 | hasse | array('placeholder'=>'半角英数字', |
36 | 'label' => 'メールアドレス(確認用)', |
||
37 | 304d523f | hasse | 'style'=>'ime-mode: disabled;', |
38 | b3a58ce1 | hasse | 'maxlength' => '255', |
39 | 'type' => 'email')); |
||
40 | 67acbfb5 | hasse | echo $this->Form->input('postcode', array('label'=>'郵便番号(ハイフンなし)', |
41 | b3a58ce1 | hasse | 'onkeyup'=>'zipsearch()', |
42 | 304d523f | hasse | 'placeholder'=>'0000000', |
43 | 'style'=>'ime-mode: disabled;', |
||
44 | 'type' => 'text' |
||
45 | b3a58ce1 | hasse | )); |
46 | echo $this->Form->input('prefecture', array('label'=>'ご住所', |
||
47 | 'placeholder'=>'例) ○○県 ○○市○○町 ○丁目 ○‐○', |
||
48 | )); |
||
49 | echo $this->Form->input('address', |
||
50 | array('label'=>'', |
||
51 | 'placeholder'=>'例) ○○ビル○○号室', |
||
52 | )); |
||
53 | echo $this->Form->input('tel', |
||
54 | 67acbfb5 | hasse | array('placeholder'=>'半角数字(00-0000-0000)', |
55 | 304d523f | hasse | 'style'=>'ime-mode: disabled;', |
56 | b3a58ce1 | hasse | 'label' => 'お電話番号', |
57 | 'maxlength' => '13', |
||
58 | 'type' => 'text')); |
||
59 | echo $this->Form->input('comment', |
||
60 | array('placeholder'=>'お問い合わせ内容をご記入ください', |
||
61 | 'label' => 'お問い合わせ内容', |
||
62 | 'maxlength' => '2000', |
||
63 | 'type' => 'textarea')); |
||
64 | |||
65 | ?> |
||
66 | </dl> |
||
67 | </section> |
||
68 | </fieldset> |
||
69 | |||
70 | 1711ffed | shiwa | <section class="button_area01"> |
71 | b3a58ce1 | hasse | <a href="/top/index"><p class="button btn_back01"></p></a> |
72 | <?php echo $this->Form->submit('',array('class'=>'button btn_check01')); ?> |
||
73 | <?php echo $this->Form->end(); ?> |
||
74 | 304d523f | hasse | </section> |
75 | 1711ffed | shiwa | </article> |
76 | b3a58ce1 | hasse | </main> |
77 | |||
78 | |||
79 | <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> |
||
80 | <script type="text/javascript"> |
||
81 | function zipsearch(){ |
||
82 | $.ajax({ |
||
83 | type: 'post', // 通信方式 POST or GET (デフォルトはGET) |
||
84 | url: '/Top/zipsearch', // 通信先 |
||
85 | dataType: 'json', // データのタイプ |
||
86 | data: { // 連想配列で入力値を受け渡す。http://User?po=hogeになる。 |
||
87 | "data[ContactValidate][postcode]": $('input#ContactValidatePostcode').val() |
||
88 | }, |
||
89 | // 成功した場合 |
||
90 | success: function(data){ |
||
91 | console.log('data',data); |
||
92 | $('input#ContactValidatePrefecture').val(data[0].zipcodes.ken+' '+data[0].zipcodes.shi_ku+' '+data[0].zipcodes.cho); |
||
93 | } |
||
94 | }); |
||
95 | // }); |
||
96 | }; |
||
97 | </script> |