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

  • SEARCH
  • Home
  • 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 3672080
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T02:33:55+00:00 2026-05-19T02:33:55+00:00

$score = new Zend_Form_Element_Radio(‘score’); $score->setRequired(true) ->setSeparator(”) ->setMultiOptions(array(1 =>’Positive’, -1 =>’Negative’)) ->setDecorators(array(‘ViewHelper’)); Renders as <label

  • 0
$score = new Zend_Form_Element_Radio('score');
$score->setRequired(true)
    ->setSeparator('')
    ->setMultiOptions(array(1 =>'Positive', -1 =>'Negative'))
    ->setDecorators(array('ViewHelper'));

Renders as

<label for="score-1">
    <input name="score" id="score-1" value="1" checked="checked" type="radio">Positive
</label>
<label for="score-1">
    <input name="score" id="score-1" value="-1" type="radio">Negative
</label>

Is the fact that it’s using the same ID for the inputs and labels normal behavior or a bug?
How can I correct this?
I can’t change the values as technically they are required to be that way

The real problem this causes is that when you click the negative the positive gets selected instead!
Thanks

  • 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-05-19T02:33:55+00:00Added an answer on May 19, 2026 at 2:33 am

    Looks like the standard ViewHelper decorator for a radio control uses a FormRadio view-helper. When this view helper creates the id it uses on the <input> element and the <label> element, it first applies the standard AlNum filter, which is filtering out your minus sign.

    So, it looks to me that instead of using the standard ViewRenderer decorator, you will have to create a custom decorator that calls your own custom FormRadio view helper.

    You might be able to avoid creating your own decorators and view helpers by creating your own custom AlNum filter that allows those minus signs. The trick is to set that path only for this single use so that you;ll be able to use the normal Alnum filter for other elements.

    Alternatively, you could probably trick the ViewHelper into using a custom FormRadio helper by adding a helper path on the view object so that it loads your custom view helper instead of the standard one.

    Just some ideas.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to update the students score with a new score but I cant
I'm using Ryan Bates' excellent scope_builder to conditionally build a new named scope to
I'm a new Windows programmer and I'm not sure where I should store user
Designing a new system from scratch. I'll be using the STL to store lists
I'm new to Objective-C and iPhone development, and I'm trying to store floating-point values
class Score { var $score; var $name; var $dept; var $date; function Score($score, $name,
How would you model a simple musical score for a single instrument written in
I'm talking about an action game with no upper score limit and no way
I have a game in which you can score from -40 to +40 on
I have a JQuery silder that I'm using to set the score on a

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.