dsgfdgh14569 2014-09-13 17:32
浏览 70
已采纳

将Google表单的服务器端验证复制粘贴到WordPress页面

I embedded a Google Form in my WordPress site by copy-pasting its source code into the page. Will I need "server side validation" for a Google Form?

Data submitted to Google Form is sent to Google Drive, therefore malicious code cannot harm my website - am I wrong? (Just to be extra clear...is data submitted to Google Form sent to my WordPress database?)

I am using some client side validation:

<input type="email" required="required" /> 

Edit

One more question. As long as the action has google's link

<form action="google form link"> 

then I am safe? So if I leave the action blank then it is no longer a Google Form, and data will be sent to my WordPress database?

  • 写回答

1条回答 默认 最新

  • douyu9433 2014-09-13 18:23
    关注

    I would discourage you from copy-pasting the Google Form into your WordPress page, because then you run the risk of Google changing something in their form processing code in the future, so that your form will no longer submit properly. The supported way is to use the embed code provided by Google which uses an <iframe> tag to insert the form into your page.

    To answer the actual question: since the action parameter of the <form> tag determines which URL the input data will be submitted to, if that URL points to Google's servers, then the data will not reach your server, and therefore you do not need to validate it on the server side.

    If you leave the action parameter blank, the data will be sent to the current URL (your WordPress page), but since WordPress is not prepared to handle Google Form submissions, it will silently discard your data. Therefore it will not be saved to your WordPress database.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 高价求中通快递查询接口
  • ¥15 解决一个加好友限制问题 或者有好的方案
  • ¥15 关于#java#的问题,请各位专家解答!
  • ¥15 急matlab编程仿真二阶震荡系统
  • ¥20 TEC-9的数据通路实验
  • ¥15 ue5 .3之前好好的现在只要是激活关卡就会崩溃
  • ¥50 MATLAB实现圆柱体容器内球形颗粒堆积
  • ¥15 python如何将动态的多个子列表,拼接后进行集合的交集
  • ¥20 vitis-ai量化基于pytorch框架下的yolov5模型
  • ¥15 如何实现H5在QQ平台上的二次分享卡片效果?