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条)

报告相同问题?

悬赏问题

  • ¥15 想通过pywinauto自动电机应用程序按钮,但是找不到应用程序按钮信息
  • ¥15 MATLAB中streamslice问题
  • ¥15 如何在炒股软件中,爬到我想看的日k线
  • ¥15 51单片机中C语言怎么做到下面类似的功能的函数(相关搜索:c语言)
  • ¥15 seatunnel 怎么配置Elasticsearch
  • ¥15 PSCAD安装问题 ERROR: Visual Studio 2013, 2015, 2017 or 2019 is not found in the system.
  • ¥15 (标签-MATLAB|关键词-多址)
  • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
  • ¥500 52810做蓝牙接受端
  • ¥15 基于PLC的三轴机械手程序