dongyiyu3953 2013-11-12 12:31
浏览 9
已采纳

即使没有点击“发送”,也需要制作保存任何更改的网络表单

In my new site I have form for client that went to contact me. I don't have much web programming experience so I'm not sure what is the easiest way to do it,

My goal is for example if the client fill his name and phone number, and then decide that there is too much fields to fill (even that it's not must) then he give-up and exit the page, Then I went to make in such case I will still get his the details that he filled, (name and phone number) Also, if he fill something and then change or delete, I also went to know.

What is the easiest way to do it? Is there any open-source PHP base system that can do it? Even add-on for WordPress. The person that fill the page, will he know that I do it? it will load each time he move field or something? because I really prefer that it won't

BTW, I'm not going to contact anyone if he not press send, I just went to learn better why I lose leads and maybe maximum to send email question about that.

Thanks, The-Blad3r

  • 写回答

3条回答 默认 最新

  • dongshang6062 2013-11-12 12:51
    关注

    I would use ajax and save everytime they change a value in the form by "change, keyup" or something similar like mentioned in the answer before. Since you use Wordpress you can use jquery for that.

    It could potentially look something like this. Made 3 different ways to define a field if you are unfamiliar with jQuery, it is a lot like CSS. The serialize does take all your fields and post them to the your_savingfile.php.

    $('input[name="firstname"], .lastname, #phonenumber').on('keyup', function(){
        saveForm($('#form-id'));
    }
    
    var function = saveForm(f) {
    
        $.ajax({
            type: "POST",
            url: "your_savingfile.php",
            data: f.serialize(),
            success: function(data) {
                $("#save-notify-div").html('Saved form...');
            }
        });
    }
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥20 机器学习能否像多层线性模型一样处理嵌套数据
  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效