Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    how to use custom type in control

    General Discussion
    1
    1
    169
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      bindev last edited by

      I want to know how to use the custom type in the Bagisto control.

      @case('custom')
              <v-field {{ $attributes }}>
                  {{ $slot }}
              </v-field>
      

      Because when I make this

      <x-shop::form.control-group.label class="mb-2 block text-[0.8125rem] max-sm:mb-1 required">Province</x-shop::form.control-group.label>
                                  <x-shop::form.control-group.control
                                      type="custom"
                                      name="province_id"
                                  >
                                      {{-- <option value="" disabled>Select Province</option>
                                      <option v-for="prov in provinces" :value="prov.id" :key="prov.id">
                                          @{{ prov.name }}
                                      </option> --}}
                                      <VSelect 
                                          ::option="provinces"
                                          v-model="province"
                                          name="province_id"
                                          class="form-control"
                                      />
                                  </x-shop::form.control-group.control>
                              <x-shop::form.control-group.error control-name="province" />
      

      there is always an error.

      create:2688 [Vue warn]: Missing required prop: "name" 
        at <Field> 
        at <Form method="POST" initial-errors= [] action="http://127.0.0.1:8000/customer/account/addresses/create" > 
        at <VCreateCustomerAddress> 
        at <App>
      
      1 Reply Last reply Reply Quote 0
      • First post
        Last post