form
Information about a form created by a form
tag.
Properties
The first address line associated with the address.
This property is exclusive to the
form.
The second address line associated with the address.
This property is exclusive to the
form.
The name of the author of the article comment.
This property is exclusive to the
form.
The content of the contact submission or article comment.
This property is exclusive to the
contact
andforms.
The company associated with the address.
This property is exclusive to the
form.
The country associated with the address.
This property is exclusive to the
form.
The email associated with the form.
- errors
Any errors from the form.
If there are no errors, then
nil
is returned.TipYou can apply the
filter to
form.errors
to output default error messages without having to loop through the array.The first name associated with the customer or address.
The last name associated with the customer or address.
The personalized message intended for the recipient.
This property is exclusive to the
product
form.The nickname of the gift card recipient.
This property is exclusive to the
product
form.The phone number associated with the address.
This property is exclusive to the
form.
Returns
true
if the form was submitted successfully. Returnsfalse
if there were errors.NoteThe
form always returns
true
.The province associated with the address.
This property is exclusive to the
form.
Renders an HTML checkbox that can submit the address as the customer's default address.
This property is exclusive to the
form.
{
"address1": "12 Phoenix Feather Alley",
"address2": "1",
"author": null,
"body": null,
"city": "Calgary",
"company": null,
"country": "Canada",
"email": null,
"errors": null,
"first_name": "Cornelius",
"id": "new",
"last_name": "Potionmaker",
"password_needed?": false,
"phone": "44 131 496 0905",
"posted_successfully?": true,
"province": "Alberta",
"set_as_default_checkbox": "<input type='checkbox' id='address_default_address_new' name='address[default]' value='1'>",
"zip": "T1X 0L4"
}