【发布时间】:2014-05-07 23:14:36
【问题描述】:
我的页面中有一个表单。我希望用户填写的表单详细信息通过特定电子邮件发送。
这是我的表格:
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 <jainishan@yahoo.in>";
$SendTo = "ishan.fzd@gmail.com";
$SubjectLine = "Feedback Submission";
// Send E-Mail and Direct Browser to Confirmation Page
mail($SendTo, $SubjectLine, $MsgBody, "From: $SendFrom");
?>
点击表单按钮,我收到以下异常:
您正在尝试解码无效的 JSON 字符串:
解析错误:语法错误,E:\softwares\Sencha dwnlds\ 中出现意外的 '.=' (T_CONCAT_EQUAL) xampp\htdocs\RasovaiApp\contact.php 上线 11
注意:“我在发送电子邮件时遇到问题。我什至无法发送基本电子邮件。”
任何帮助都会很棒。
谢谢 伊山耆那教
【问题讨论】:
-
xtype的值应该是一个对象吗?看不到任何开始{或结束}.. -
其实是集成在vbox容器中的Form Panel。我还没有发布全班。这个视图运行得非常好。只有当我点击提交按钮时才会出现异常。
标签: php javascript sencha-touch sencha-touch-2