2013-05-20 35 views
0

我有一個窗體在我的頁面。我希望用戶填寫的表單詳細信息可以發送特定的電子郵件。電子郵件在Sencha觸摸形式細節給予例外

這裏是我的表:

xtype: 'formpanel', 
      width: 300, 
      height: 900,//recommended for the build 
      url: 'contact.php', 
      scrollable:false, 
      items:[ 
        { 
         xtype: 'textfield', 
         name : 'name', 
         label: 'Name', 
         labelWidth:100 
        }, 
        { 
         xtype: 'textfield', 
         name : 'Date of birth', 
         label: 'Date of birth', 
         maxLength: 10, 
         labelWidth:120 
        }, 
        { 
         xtype: 'textfield', 
         name : 'Nationality', 
         label: 'Nationality', 
         labelWidth:100 
        }, 
        { 
         xtype: 'textfield', 
         name : 'City of Residence', 
         label: 'City of Residence', 
         labelWidth:170 
        }, 
        { 
         xtype: 'textfield', 
         name : 'Country', 
         label: 'Country', 
         labelWidth:100 
        },     
        { 
         xtype: 'textfield', 
         name : 'Date', 
         label: 'Starting date of this course', 
         labelWidth:220 
        }, 
        { 
         xtype: 'fieldset', 
         title: '3. Course to join', 
         items: [ 
          { 
           xtype: 'selectfield', 
           label: 'Choose one', 
           labelWidth:120, 
           options: [ 
            {text: 'Ayurveda Massage (Ayurveda Yoga Massage)', value: 'first'}, 
            {text: 'Ayur Balance Massage', value: 'second'}, 
            {text: 'Abhyanga Massage with Shirodhara', value: 'third'} 
           ] 
          } 
         ] 
        }, 
        { 
         xtype: 'numberfield', 
         name : 'Date', 
         label: 'Starting date of this course', 
         labelWidth:220 
        }, 
        { 
         xtype: 'numberfield', 
         name : 'Your Phone', 
         label: 'Your Phone', 
         labelWidth:120 
        }, 
        { 
         xtype: 'toolbar', 
         items: [ 
          { 
           xtype: 'button', 
           height: 30, 
           text: 'Submit', 
           ui  : 'confirm', 
           handler : function(button) { 
            this.up('formpanel').submit(); 
           } 
          } 
         ] 
        } 
       ] 

這裏是我的PHP腳本:

<?php 
// Configuration Settings 
$SendFrom = "Form Feedback <[email protected]>"; 
$SendTo =  "[email protected]"; 
$SubjectLine = "Feedback Submission"; 


// Send E-Mail and Direct Browser to Confirmation Page 
mail($SendTo, $SubjectLine, $MsgBody, "From: $SendFrom"); 
?> 

在表單按鈕的自來水,我得到一個以下異常:

你試圖解碼無效的JSON字符串:
解析錯誤:語法錯誤,意外'。='(T_CONCAT_EQUAL)i ñE:\軟件\煎茶dwnlds \ XAMPP \ htdocs中\ RasovaiApp \ contact.php上線

注:「我現在面臨的問題,同時發送電子郵件。我甚至不能夠發送基本的電子郵件。」

任何幫助將不勝感激。

感謝 依禪耆那教

+0

應該'xtype'的值是一個對象嗎?看不到任何開始的'{'或結束'}' – dbf

+0

實際上它是Form面板它集成在一個vbox容器中,我沒有發佈全班d這個觀點運行得非常好。只有在點擊提交按鈕時纔會發生異常。 –

回答