action: /ext/shop/edit_shoporder
# indicator is the field that is used to test for form submission
indicator: submit
auto_fieldset: 1
model_config:
 resultset: Shoporder

elements:
 - type: Hidden
   name: id

 - type: Select
   name: status_id
   label: Status
   label_loc: Status
   model_config:
     resultset: Status
     localize_label: 1

 - type: Checkbox
   name: other_address
   label_loc: 'Other address'
   constraints:
    - type: DependOn
      others:
       - firstname
       - lastname
       - email
       - country_id
       - region
       - town
       - address
       - postal_code
       - phone
      message_loc: 'This field is required'

 - type: Text
   name: firstname
   label: Firstname
   label_loc: Firstname

 - type: Text
   name: lastname
   label: Lastname
   label_loc: Lastname

 - type: Text
   name: email
   label: E-mail
   label_loc: E-mail
   constraints:
    - Email

 - type: Select
   name: country_id
   label: Country
   label_loc: Country
   empty_first: 1
   empty_first_label_loc: Select country
   model_config:
     resultset: Country

 - type: Text
   name: region
   label: State
   label_loc: State

 - type: Text
   name: town
   label: Town
   label_loc: Town

 - type: Text
   name: address
   label: Address
   label_loc: Address

 - type: Text
   name: postal_code
   label: Postal code
   label_loc: Postal code

 - type: Text
   name: phone
   label: Phone
   label_loc: Phone

 - type: Fieldset
 - type: Radiogroup
   name: shipping_method_id
   label_loc: Shipping method
   model_config:
     resultset: ShippingMethod
     localize_label: 1
   constraints:
    - Required
    - type: Number

 - type: Fieldset
 - type: Radiogroup
   name: payment_method_id
   label_loc: Payment method
   model_config:
     resultset: PaymentMethod
     localize_label: 1
   constraints:
    - Required
    - type: Number
     
# The Submit button
 - type: Submit
   name: submit
   # The text to be displayed
   value: Save
   value_loc: Save


