📙
QuickAdminPanel
  • QuickAdminPanel Docs
  • Quick Start: Creating Panel
    • Creating a Simple CRUD
    • Radio/Checkbox/Select Fields
    • Relationships fields: belongsTo/belongsToMany
    • File/Photo Upload Fields
    • Date/Time Picker Fields
    • Multi-language Projects
    • API Generator
    • Roles and Permissions
    • How to Change Design Template/Theme
  • Using the Generated Code
    • Download Code and Install on Your Web-Server
    • Push Code to Your Github
    • Edit Code and Merge Changes
    • What Files are Inside the CRUD
  • Modules
    • Modules Overview
    • AJAX Datatables
    • System Calendar
    • Audit Changes Logs
    • Dashboard and Reports
    • Multi-Tenancy
    • CSV Import
    • Global Search
    • User Registration
    • Internal Messages
    • Change Notifications
    • Tasks + Calendar
    • Courses LMS
    • CRUD Templates Modules
  • Customizing the Code
    • Datatables Customizations
    • Upgrade Laravel version
    • Dependent Dropdowns: Parent-Child
    • Add Front User Without Admin Permissions
    • How to Add Mass Actions to Datatable
  • Vue.js + Laravel API Version
    • QuickAdminPanel: Vue.js+Laravel Version
    • What Files are Inside Vue.js+Laravel CRUD?
    • Installing Downloaded Vue.js+Laravel Panel
  • Livewire + Tailwind Version
    • QuickAdminPanel: Livewire+Tailwind Version
    • What Files are Inside Livewire+Tailwind CRUD?
    • Installing Downloaded Livewire+Tailwind Panel
Powered by GitBook
On this page
  • Radio/Select Options
  • Customizing the options
  • Checkbox Default State
  • Visual Result
  1. Quick Start: Creating Panel

Radio/Checkbox/Select Fields

PreviousCreating a Simple CRUDNextRelationships fields: belongsTo/belongsToMany

Last updated 4 years ago

We have three so-called "Choice" field types:

  • Radio button

  • Checkbox

  • Select Dropdown

If you prefer video, here's a quick video demo for all of them.

Now, separately about each one.

Radio/Select Options

If you choose a field types Radio or Select, you should enter all different values in key-value pairs. One of them goes to the database value, another one is shown visually on the page, as a label. Also, you may specify Default value.

Customizing the options

The possible options with key-value pairs are saved in the Model, as constant array:

So if you want to add more options or customize them, you need to edit those arrays.

In the database, those values are saved as varchar type, not as enum. That's why it's flexible to change in the model, without doing any manipulations in the database.

Checkbox Default State

For the Checkbox field type, you can select whether it's checked by default:

Visual Result

If we add all three fields shown above, here's how it will look in our panel:

Example for the Radio field type
Example for the Select field type