3. フォームとフォーム処理に関するアドバイス (Advice for Forms and Form Processing)
3. フォームとフォーム処理に関するアドバイス (Advice for Forms and Form Processing)
🇬🇧 英文原文
The representation and interpretation of forms and the nature of form processing is not specified by this document. However, for forms and form processing that result in the generation of multipart/form-data, some suggestions are included.
In a form, there is generally a sequence of fields, where each field is expected to be supplied with a value, e.g., by a user who fills out the form. Each field has a name. After a form has been filled out and the form's data is "submitted", the form processing results in a set of values for each field -- the "form data".
In forms that work with multipart/form-data, field names could be arbitrary Unicode strings; however, restricting field names to ASCII will help avoid some interoperability issues (see Section 5.1).
Within a given form, ensuring field names are unique is also helpful. Some fields may have default values or presupplied values in the form itself. Fields with presupplied values might be hidden or invisible; this allows using generic processing for form data from a variety of actual forms.
🇯🇵 日本語訳
フォームの表現と解釈、およびフォーム処理の性質は、本文書では規定されていない。ただし、multipart/form-dataの生成につながるフォームおよびフォーム処理については、いくつかの提案が含まれている。
フォームには通常、一連のフィールドがあり、各フィールドには値が提供されることが期待される。たとえば、フォームに記入するユーザーによって提供される。各フィールドには名前がある。フォームが記入され、フォームのデータが「送信」された後、フォーム処理により各フィールドの値のセット、すなわち「フォームデータ」が生成される。
multipart/form-dataを使用するフォームでは、フィールド名は任意のUnicode文字列である可能性がある。ただし、フィールド名をASCIIに制限することで、いくつかの相互運用性の問題を回避できる(セクション5.1を参照)。
特定のフォーム内では、フィールド名が一意であることを確認することも有用である。一部のフィールドには、フォーム自体にデフォルト値または事前提供された値がある場合がある。事前提供された値を持つフィールドは、非表示または不可視である可能性がある。これにより、さまざまな実際のフォームからのフォームデータに対して汎用的な処理を使用できる。