Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | 19x 7x 19x 48x 19x 174x | import { FormField } from '@bigcommerce/checkout-sdk'; export function getAddressFormFieldsWithCustomRequired(): FormField[] { return [ ...getAddressFormFields(), { custom: true, default: '', id: 'foo', label: 'foo', name: 'foo', required: true, }, ]; } export function getAddressFormFields(): FormField[] { return [ ...getFormFields(), { custom: false, default: '', id: 'company', label: 'Company', name: 'company', required: false, }, { custom: false, default: '', id: 'stateOrProvince', label: 'Province', name: 'stateOrProvince', required: false, }, { custom: false, default: '', id: 'stateOrProvinceCode', label: 'Province', name: 'stateOrProvinceCode', required: false, }, { custom: false, default: '', id: 'phone', label: 'Phone', name: 'phone', required: false, }, { custom: false, default: '', id: 'postalCode', label: 'Postal Code', name: 'postalCode', required: false, }, { custom: false, default: '', id: 'city', label: 'City', name: 'city', required: false, }, { custom: false, default: '', id: 'country', label: 'Country', name: 'country', required: false, }, { custom: false, default: '', id: 'countryCode', label: 'Country', name: 'countryCode', required: true, }, ]; } export function getFormFields(): FormField[] { return [ { custom: false, default: '', id: 'field_14', label: 'First Name', name: 'firstName', required: true, }, { custom: false, default: '', id: 'field_15', label: 'Last Name', name: 'lastName', required: true, }, { custom: false, default: '', id: 'field_18', label: 'Address Line 1', name: 'address1', required: true, }, { custom: false, default: '', id: 'field_19', label: 'Address Line 2', name: 'address2', required: false, }, { custom: true, default: '', fieldType: 'text', id: 'field_25', label: 'Custom message', name: 'field_25', required: false, type: 'string', }, { custom: true, default: '', fieldType: 'dropdown', id: 'field_27', label: 'Custom dropdown', name: 'field_27', options: { items: [ { value: '0', label: 'Foo', }, { value: '1', label: 'Bar', }, ], }, required: false, type: 'array', }, { custom: true, default: undefined, fieldType: 'text', id: 'field_31', label: 'Custom number', name: 'field_31', required: false, type: 'integer', }, ]; } |