Submit Hint
Name
http://lynx-json.org/submit
Meaning
A submit hint describes a value that defines where and how to submit form data.
Related Hints
None
Synonyms
None
Format Rules
If the value is present, it must comply with the following rules:
- MUST be an object.
- MUST have an
actionproperty whose value is a valid URI. - MAY have a
methodproperty indicating the protocol method used to submit the form data. - MAY have an
enctypeproperty indicating how the form data is to be encoded. If not present, the default value isapplication/x-www-form-urlencoded. - MAY have a
typeproperty whose value must be a valid media type name to indicate the expected media type of the content. - MAY have a
relproperty whose value specifies the relationship between the document containing the submit and the destination resource, as described in RFC 5988. - MAY have a
sendproperty whose value MUST be one of the following:changeindicating that the user agent should invoke the submit on behalf of the user when the user changes an input value, orreadyindicating that the user agent should invoke the submit on behalf of the user when the submit is ready.
- MAY contain other properties.
Examples
{
"title": "Submit Review",
"action": "http://www.example.com/m/fletch/reviews",
"method": "POST",
"spec": {
"hints": [ "submit" ],
"children": [
{
"name": "title",
"hints": [ "label", "text" ]
}
]
}
}
Authoring Rules
None
Authoring Considerations
None
User Agent Rules
- The user agent MUST provide the user with a control to perform the submission.
- If the
methodproperty is not present, then the user agent MUST submit the form data using the default retrieval action for the protocol (e.g. GET for HTTP). - When a
submitcontrol is invoked, the user agent MUST prepare a form data set, encode the form data set into a representation, and submit the representation, as defined in the Process for Submitting Form Data section. - If the
submitcontrol contains asendproperty with a value ofchange, the user agent MUST submit the related form data when the value of an input changes if the validation state of the form is not invalid. - If the
submitcontrol contains asendproperty with a value ofready, the user agent MUST submit the related form data when thesubmitcontrol is ready.
User Agent Considerations
- The user agent must anticipate that a value described by a
submithint may not contain visible content. - The user agent must anticipate that a value described by a
submithint may contain other properties that are also described by a specification.