Home » Custom Posts and Fields » Dropdown Field

Dropdown Field

How to Add a Dropdown Field in QuickBuildWP?

Step 1: Access Field Groups

  1. Navigate to QuickBuildWP in your WordPress dashboard.
  2. Click on Field Groups.
  3. Select the form that you want to modify.

Step 2: Edit the Form

  1. Locate the form where you want to add the dropdown field.
  2. Click the Edit link.
  3. For example, let's add a service_timeline field to the Business Query form.
  4. Click Edit on the Business Query form.

Step 3: Add a Custom Dropdown Field

  1. Scroll to the Custom Fields section.
  2. Click the Add button.
  3. Select Dropdown as the Type.
  4. Choose Basic Information as the Meta Box.
  5. In the Label field, enter: How soon would you like this service?
  6. Set the Field Name to service_timeline.
  7. Choose Validation Rules as per your requirements.

Step 4: Add Dropdown Options

  1. In the Options field, enter the following JSON format:
{
  "options": [
    { "name": "ASAP", "value": "asap" },
    { "name": "1 to 2 Weeks", "value": "1_2_weeks" },
    { "name": "3 to 4 Weeks", "value": "3_4_weeks" },
    { "name": "Longer than 4 Weeks", "value": "longer_than_4_weeks" }
  ],
  "options_detailed": 1
}
  1. This will add four dropdown options: ASAP, 1 to 2 weeks, 3 to 4 weeks, or longer than 4 weeks.

  2. Ensure the JSON is correctly formatted before saving.

Step 5: Save Changes

  1. Click the Update button to save your changes.
  2. Your dropdown field is now added successfully to the form.

Step 6: Test the Dropdown Field

  1. Open the Business Query form.
  2. Verify that the dropdown field appears with the correct options.
  3. Submit a test form to ensure validation and data submission work as expected.
Your dropdown field is now successfully integrated into QuickBuildWP!