Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7784731
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:08:31+00:00 2026-06-01T20:08:31+00:00

I know I can create a form multi checkbox using new Zend_Form_Element_MultiCheckbox() . I’m

  • 0

I know I can create a form multi checkbox using new Zend_Form_Element_MultiCheckbox(). I’m not using this syntax however. I’m using the form view helper syntax in the view, like so:

echo $this->formMultiCheckbox('boxes', null, null, $possible_vals_array, null);

My question is how do I, using this syntax, add an array for the values that need to be checked by default?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T20:08:32+00:00Added an answer on June 1, 2026 at 8:08 pm

    The second parameter of $this->formMultiCheckbox() should be an array of values to have checked.

    So if you your $possible_vals_array looks like this:

    $possible_vals_array = array(
        'Value A' => 'Label A',
        'Value B' => 'Label B',
        'Value C' => 'Label C',
    );
    

    … and say you want to have values A and C checked by default, you’d pass an array like this as the second parameter:

    $checked_vals_array = array('Value A', 'Value C');
    

    So your call to the helper would look like this:

    echo $this->formMultiCheckbox(
        'boxes', $checked_vals_array, null, $possible_vals_array, null
    );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know I can create a plot with line and dots using the type
I'm using python 3.1.1. I know that I can create byte objects using the
I know that horizontal partitioning...you can create many tables. How can you do this
I know that we can't overload operator with other meaning, we can't create new
I want to know how I can create a folder via Oracle form Builder?
I would like to know how can I create a form that submits to
I can create form with drupal forms api, but I don't know how to
How can I create a object with a form's fields and values? like this
I'm new to MVC and wanted to know how we can create controls dynamically
Does anyone know if I can create an HTML Form to search the DHL

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.