Sencha Touch中的电子邮件表单详细信息提供例外 [英] Email form detail in Sencha Touch giving exception

查看:56
本文介绍了Sencha Touch中的电子邮件表单详细信息提供例外的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的页面中有一个表单。我希望通过特定电子邮件发送由用户填写的表单详细信息。

这是我的表格:

 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字符串:
分析错误:语法错误,第11行的E:softwaresSencha dwnldsxampphtdocsRasovaiAppcontact.php中出现意外的‘.=’(T_CONCAT_EQUAL)

注意:"我在发送电子邮件时遇到问题。我甚至无法发送基本的电子邮件。"

任何帮助都是非常好的。

谢谢 伊山·杰恩

推荐答案

您可以使用表单的getValues()方法获取表单数据,然后根据您的方便对其进行格式化,而不是直接提交。请看此示例:http://try.sencha.com/touch/2.0.1/demos/Ext.form.FormPanel.getValues/viewer.html

这篇关于Sencha Touch中的电子邮件表单详细信息提供例外的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆