TPS Formdata Lists

by 1 contributor:
この記事はまだ日本語に翻訳されていません。MDN の翻訳はボランティアによって行われています。是非 MDN に登録し、私たちの力になって下さい。

A Formdata asset list is an array of objects, each with the following properties:

  • fieldname: required.
  • value: required.
  • date: the date the form data was used, expressed in hours from the present, so 0 means now, and -24 means 24 hours ago. Optional, defaults to 0.

For example:

var formdata1 = [
  { fieldname: "testing",
    value: "success",
    date: -1
  },
  { fieldname: "testing",
    value: "failure",
    date: -2
  },
  { fieldname: "username",
    value: "joe"
  }
];

Formdata lists and phase actions

You can use the following functions in phase actions for formdata lists:

  • Formdata.add
  • Formdata.delete
  • Formdata.verify
  • Formdata.verifyNot

For an example, see the TPS formdata unittest:  http://hg.mozilla.org/services/tps/f...st_formdata.js

Notes

Note 1, TPS supports the delete action for Formdata, but Sync currently does not correctly sync deleted form data, see bug 564296.

Note 2, Sync currently does not sync Formdata dates, so the date field is ignored when performing verify and verify-not actions. See bug 552531.

ドキュメントのタグと貢献者

タグ: 
Contributors to this page: jgriffin
最終更新者: jgriffin,